Skip to content
Browse files

Store only the domain part of the URL.

  • Loading branch information...
1 parent b432d97 commit 93edfd3704b666ada9f3c8e3e9d1a4cf16914b93 @phw committed May 31, 2012
Showing with 11 additions and 7 deletions.
  1. +3 −3 AndroidManifest.xml
  2. +8 −4 src/com/uploadedlobster/PwdHash/PwdHashApp.java
View
6 AndroidManifest.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.uploadedlobster.PwdHash" android:versionCode="6"
- android:versionName="1.2.3">
+ package="com.uploadedlobster.PwdHash" android:versionCode="7"
+ android:versionName="1.2.4">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
<application android:icon="@drawable/icon" android:label="@string/app_name"
@@ -19,4 +19,4 @@
</intent-filter>
</activity>
</application>
-</manifest>
+</manifest>
View
12 src/com/uploadedlobster/PwdHash/PwdHashApp.java
@@ -82,7 +82,7 @@ public void onCreate(Bundle savedInstanceState) {
@Override
protected void onStop() {
super.onStop();
- mPreferences.setSavedSiteAddress(mSiteAddress.getText().toString());
+ mPreferences.setSavedSiteAddress(getDomain());
}
private void setWindowGeometry() {
@@ -124,8 +124,7 @@ private void registerEventListeners() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- String realm = DomainExtractor.extractDomain(mSiteAddress.getText()
- .toString());
+ String realm = getDomain();
String password = mPassword.getText().toString();
updateHashedPassword(realm, password);
@@ -166,6 +165,11 @@ public void onClick(View v) {
}
});
}
+
+ private String getDomain() {
+ return DomainExtractor.extractDomain(
+ mSiteAddress.getText().toString());
+ }
private String updateHashedPassword(String realm, String password) {
String result = "";
@@ -190,4 +194,4 @@ private void showNotification(CharSequence text) {
Toast toast = Toast.makeText(context, text, duration);
toast.show();
}
-}
+}

0 comments on commit 93edfd3

Please sign in to comment.
Something went wrong with that request. Please try again.