Bug 1142459 - Fix mixed content shield notification broke by
bug 1140830. r=rnewman, a=sledru
--- a/mobile/android/base/SiteIdentity.java
+++ b/mobile/android/base/SiteIdentity.java
@@ -117,23 +117,27 @@ public class SiteIdentity {
return mId;
}
}
public SiteIdentity() {
reset();
}
- public void reset() {
+ public void resetIdentity() {
mSecurityMode = SecurityMode.UNKNOWN;
mHost = null;
mOwner = null;
mSupplemental = null;
mVerifier = null;
mEncrypted = null;
+ }
+
+ public void reset() {
+ resetIdentity();
mMixedMode = MixedMode.UNKNOWN;
mTrackingMode = TrackingMode.UNKNOWN;
}
void update(JSONObject identityData) {
if (identityData == null) {
reset();
return;
@@ -152,33 +156,31 @@ public class SiteIdentity {
mTrackingMode = TrackingMode.fromString(mode.getString("tracking"));
} catch (Exception e) {
mTrackingMode = TrackingMode.UNKNOWN;
}
try {
mSecurityMode = SecurityMode.fromString(mode.getString("identity"));
} catch (Exception e) {
- reset();
+ resetIdentity();
return;
}
try {
mHost = identityData.getString("host");
mOwner = identityData.optString("owner", null);
mSupplemental = identityData.optString("supplemental", null);
mVerifier = identityData.getString("verifier");
mEncrypted = identityData.getString("encrypted");
} catch (Exception e) {
- reset();
+ resetIdentity();
}
} catch (Exception e) {
reset();
- mMixedMode = MixedMode.UNKNOWN;
- mTrackingMode = TrackingMode.UNKNOWN;
}
}
public SecurityMode getSecurityMode() {
return mSecurityMode;
}
public String getHost() {