accounts: resolve error-prone warnings

- missing @Override annotations
 - inner classes should be static if possible

Bug: 38496625
Test: build
Change-Id: Ic6a647b894036266dfa8f9908cec6049952cd38d
This commit is contained in:
Andrew Scull
2017-05-22 17:49:58 +01:00
parent 87a1ec2b1e
commit c7770d6ebf
3 changed files with 6 additions and 1 deletions

View File

@@ -53,6 +53,7 @@ import java.io.IOException;
AccountManager.AUTHENTICATOR_ATTRIBUTES_NAME, sSerializer);
}
@Override
public AuthenticatorDescription parseServiceAttributes(Resources res,
String packageName, AttributeSet attrs) {
TypedArray sa = res.obtainAttributes(attrs,
@@ -81,11 +82,13 @@ import java.io.IOException;
}
private static class MySerializer implements XmlSerializerAndParser<AuthenticatorDescription> {
@Override
public void writeAsXml(AuthenticatorDescription item, XmlSerializer out)
throws IOException {
out.attribute(null, "type", item.type);
}
@Override
public AuthenticatorDescription createFromXml(XmlPullParser parser)
throws IOException, XmlPullParserException {
return AuthenticatorDescription.newKey(parser.getAttributeValue(null, "type"));

View File

@@ -4944,6 +4944,7 @@ public class AccountManagerService
this.userDebugDbInsertionPoint = userDebugDbInsertionPoint;
}
@Override
public void run() {
SQLiteStatement logStatement = userAccount.statementForLogging;
logStatement.bindLong(1, accountId);
@@ -6060,7 +6061,7 @@ public class AccountManagerService
}
}
private class NotificationId {
private static class NotificationId {
final String mTag;
private final int mId;

View File

@@ -1321,6 +1321,7 @@ class AccountsDb implements AutoCloseable {
}
}
@Override
public void close() {
mDeDatabase.close();
}