Commit 7b220ad8 authored by Grigory Fedorov's avatar Grigory Fedorov

Android Studio clean up code tool run.

parent e56eb4d4
......@@ -38,8 +38,6 @@ public class LogManager implements OnLoadListener {
log = debugable && SettingsManager.debugLog();
}
;
private final static LogManager instance;
static {
......
......@@ -26,5 +26,5 @@ public interface OnCloseListener extends BaseManagerInterface {
* <p/>
* This function will be call from UI thread.
*/
public void onClose();
void onClose();
}
......@@ -26,5 +26,5 @@ interface OnErrorListener extends BaseUIListener {
*
* @param resourceId String with error description.
*/
public void onError(int resourceId);
void onError(int resourceId);
}
......@@ -26,7 +26,7 @@ package com.xabber.android.data;
*/
public interface OnTimerListener extends BaseManagerInterface {
public final static int DELAY = 1000;
int DELAY = 1000;
/**
* Called after at least {@link #DELAY} milliseconds.
......
......@@ -28,6 +28,6 @@ public interface OnUnloadListener extends BaseManagerInterface {
* WILL BE CALLED FROM BACKGROUND THREAD. DON'T CHANGE OR ACCESS
* APPLICATION'S DATA HERE!
*/
public void onUnload();
void onUnload();
}
......@@ -54,6 +54,6 @@ public enum CommonState {
/**
* There is at least one account with received roster.
*/
online;
online
}
......@@ -29,7 +29,7 @@ interface OAuthProvider extends BaseManagerInterface {
/**
* @return Supported protocol.
*/
public AccountProtocol getAccountProtocol();
AccountProtocol getAccountProtocol();
/**
* Gets refresh token using Request Access Token.
......@@ -40,7 +40,7 @@ interface OAuthProvider extends BaseManagerInterface {
* @return refresh token or <code>null</code> if auth failed.
* @throws NetworkException
*/
public String requestRefreshToken(String code) throws NetworkException;
String requestRefreshToken(String code) throws NetworkException;
/**
* Requests password renew from server based on refreshToken.
......@@ -51,7 +51,7 @@ interface OAuthProvider extends BaseManagerInterface {
* @return <code>null</code> on authorization fail.
* @throws NetworkException
*/
public OAuthResult requestAccessToken(String refreshToken)
OAuthResult requestAccessToken(String refreshToken)
throws NetworkException;
/**
......
......@@ -30,5 +30,5 @@ public interface OnAccountChangedListener extends BaseUIListener {
*
* @param accounts
*/
public void onAccountsChanged(Collection<String> accounts);
void onAccountsChanged(Collection<String> accounts);
}
......@@ -472,7 +472,7 @@ public class ConnectionThread implements
Throwable e1 = ((XMPPException) e).getWrappedThrowable();
if (!(e1 instanceof SSLException))
return;
Throwable e2 = ((SSLException) e1).getCause();
Throwable e2 = e1.getCause();
if (!(e2 instanceof CertificateException))
return;
runOnUiThread(new Runnable() {
......
......@@ -102,7 +102,7 @@ public class DNSManager {
}
for (Resolver check : resolver.getResolvers())
if (check instanceof SimpleResolver) {
((SimpleResolver) check).setTimeout(30);
check.setTimeout(30);
} else {
LogManager.i(this, "Not simple resolver!!!?" + check);
}
......
......@@ -25,6 +25,6 @@ public enum NetworkState {
suspended,
unavailable;
unavailable
}
......@@ -81,9 +81,7 @@ public class Target implements Comparable<Target> {
return false;
if (priority != other.priority)
return false;
if (weight != other.weight)
return false;
return true;
return weight == other.weight;
}
@Override
......
......@@ -29,9 +29,9 @@ import android.provider.BaseColumns;
*/
public abstract class AbstractAccountTable extends AbstractTable {
public static interface Fields extends BaseColumns {
public interface Fields extends BaseColumns {
public static final String ACCOUNT = "account";
String ACCOUNT = "account";
}
......
......@@ -23,9 +23,9 @@ import android.database.Cursor;
*/
public abstract class AbstractEntityTable extends AbstractAccountTable {
public static interface Fields extends AbstractAccountTable.Fields {
public interface Fields extends AbstractAccountTable.Fields {
public static final String USER = "user";
String USER = "user";
}
......
......@@ -27,6 +27,6 @@ public enum MatchMode {
bare,
exect;
exect
}
......@@ -47,7 +47,7 @@ public enum ClientSoftware {
private final static Pattern GTALK_NODE = Pattern
.compile("(?iu).*mail\\.google\\.com.*client.*");
private ClientSoftware(String regularExpression) {
ClientSoftware(String regularExpression) {
this.regularExpression = Pattern.compile(regularExpression);
}
......
......@@ -30,6 +30,6 @@ public enum SessionState {
* Data form of type "form" with a "renegotiate" field whose value is "1"
* has been sent.
*/
renegotiation;
renegotiation
}
......@@ -31,7 +31,7 @@ public interface OnVCardListener extends BaseUIListener {
* @param bareAddress
* @param vCard
*/
public void onVCardReceived(String account, String bareAddress, VCard vCard);
void onVCardReceived(String account, String bareAddress, VCard vCard);
/**
* Fail occurred on vCard response.
......@@ -39,6 +39,6 @@ public interface OnVCardListener extends BaseUIListener {
* @param account
* @param bareAddress
*/
public void onVCardFailed(String account, String bareAddress);
void onVCardFailed(String account, String bareAddress);
}
......@@ -28,6 +28,6 @@ public interface OnChatChangedListener extends BaseUIListener {
* @param user
* @param incoming Whether new incoming message received.
*/
public void onChatChanged(String account, String user, boolean incoming);
void onChatChanged(String account, String user, boolean incoming);
}
......@@ -22,6 +22,6 @@ package com.xabber.android.data.notification;
*/
public interface AccountNotificationItem extends NotificationItem {
public String getAccount();
String getAccount();
}
......@@ -21,6 +21,6 @@ package com.xabber.android.data.notification;
*/
public interface EntityNotificationItem extends AccountNotificationItem {
public String getUser();
String getUser();
}
......@@ -21,6 +21,6 @@ package com.xabber.android.data.roster;
*/
public interface Group {
public String getName();
String getName();
}
......@@ -31,6 +31,6 @@ public interface OnContactChangedListener extends BaseUIListener {
*
* @param entities
*/
public void onContactsChanged(Collection<BaseEntity> entities);
void onContactsChanged(Collection<BaseEntity> entities);
}
......@@ -37,7 +37,7 @@ public interface OnRosterChangedListener extends BaseManagerInterface {
* @param removedContacts
* @param removedGroups
*/
public void onRosterUpdate(
void onRosterUpdate(
Collection<RosterGroup> addedGroups,
Map<RosterContact, String> addedContacts,
Map<RosterContact, String> renamedContacts,
......@@ -51,14 +51,14 @@ public interface OnRosterChangedListener extends BaseManagerInterface {
*
* @param rosterContact
*/
public void onPresenceChanged(Collection<RosterContact> rosterContact);
void onPresenceChanged(Collection<RosterContact> rosterContact);
/**
* Contact's structured name has been changed.
*
* @param rosterContact
*/
public void onContactStructuredInfoChanged(RosterContact rosterContact,
StructuredName structuredName);
void onContactStructuredInfoChanged(RosterContact rosterContact,
StructuredName structuredName);
}
......@@ -34,7 +34,7 @@ public class ConnectivityReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
if (!ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction()))
return;
NetworkInfo networkInfo = (NetworkInfo) intent
NetworkInfo networkInfo = intent
.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
if (networkInfo == null) {
LogManager.e(this, "NO INFO");
......
......@@ -166,7 +166,7 @@ public class ChatViewerAdapter extends FragmentStatePagerAdapter {
}
public interface FinishUpdateListener {
public void onChatViewAdapterFinishUpdate();
void onChatViewAdapterFinishUpdate();
}
public ArrayList<AbstractChat> getActiveChats() {
......
......@@ -66,7 +66,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragment
/**
* Possible operations.
*/
private static enum Operation {
private enum Operation {
save, discard, read
}
......
......@@ -28,12 +28,12 @@ public interface Container extends Instance {
/**
* @return XML element name.
*/
public String getElementName();
String getElementName();
/**
* @return XML namespace.
*/
public String getNamespace();
String getNamespace();
/**
* Serializes an inner content of XML tag.
......@@ -41,7 +41,7 @@ public interface Container extends Instance {
* @param serializer
* @throws IOException
*/
public abstract void serializeContent(XmlSerializer serializer)
void serializeContent(XmlSerializer serializer)
throws IOException;
}
......@@ -32,7 +32,7 @@ public interface Instance {
* @return Whether parsed instance has valid values (e.g. required field are
* not <code>null</code>).
*/
public boolean isValid();
boolean isValid();
/**
* Serializes an instance into XML using serializer.
......@@ -40,6 +40,6 @@ public interface Instance {
* @param serializer
* @throws IOException
*/
public void serialize(XmlSerializer serializer) throws IOException;
void serialize(XmlSerializer serializer) throws IOException;
}
......@@ -132,7 +132,7 @@ public class ProviderUtils {
* @throws Exception
*/
public static String parseText(XmlPullParser parser, int maximum)
throws OverflowReceiverBufferException, Exception {
throws Exception {
final StringBuilder text = new StringBuilder();
int inner = 1;
boolean overflow = false;
......@@ -179,7 +179,7 @@ public class ProviderUtils {
* @throws Exception
*/
public static void skipTag(XmlPullParser parser)
throws IllegalStateException, Exception {
throws Exception {
LinkedList<String> tags = new LinkedList<String>();
tags.add(parser.getName());
while (!tags.isEmpty()) {
......
......@@ -23,12 +23,12 @@ import java.util.Date;
*/
public interface CollectionHeader {
public Date getStart();
Date getStart();
public String getStartString();
String getStartString();
public Integer getVersion();
Integer getVersion();
public String getWith();
String getWith();
}
......@@ -62,7 +62,7 @@ public enum OtrMode {
private final LoggingValue[] loggingValues;
private OtrMode(LoggingValue[] loggingValues) {
OtrMode(LoggingValue[] loggingValues) {
this.loggingValues = loggingValues;
}
......
......@@ -47,7 +47,7 @@ public enum SaveMode {
private String value;
private SaveMode(String name) {
SaveMode(String name) {
this.value = name;
}
......
......@@ -37,7 +37,7 @@ public enum DisclosureValue {
private final String label;
private DisclosureValue(String label) {
DisclosureValue(String label) {
this.label = label;
}
......
......@@ -33,7 +33,7 @@ public enum LoggingValue {
private final String label;
private LoggingValue(String label) {
LoggingValue(String label) {
this.label = label;
}
......
......@@ -35,7 +35,7 @@ public enum SecurityValue {
private final String label;
private SecurityValue(String label) {
SecurityValue(String label) {
this.label = label;
}
......
......@@ -28,6 +28,6 @@ public enum AddressProperty {
PCODE,
CTRY;
CTRY
}
......@@ -20,6 +20,6 @@ public enum Classification {
PRIVATE,
CONFIDENTIAL;
CONFIDENTIAL
}
......@@ -24,6 +24,6 @@ public enum EmailType {
X400,
PREF;
PREF
}
......@@ -18,6 +18,6 @@ import com.xabber.xmpp.Instance;
public interface Logo extends Instance {
public static final String ELEMENT_NAME = "LOGO";
String ELEMENT_NAME = "LOGO";
}
......@@ -24,6 +24,6 @@ public enum NameProperty {
PREFIX,
SUFFIX;
SUFFIX
}
......@@ -18,6 +18,6 @@ import com.xabber.xmpp.Instance;
public interface Photo extends Instance {
public static final String ELEMENT_NAME = "PHOTO";
String ELEMENT_NAME = "PHOTO";
}
......@@ -18,6 +18,6 @@ import com.xabber.xmpp.Instance;
public interface Sound extends Instance {
public static final String ELEMENT_NAME = "SOUND";
String ELEMENT_NAME = "SOUND";
}
......@@ -40,6 +40,6 @@ public enum TelephoneType {
PCS,
PREF;
PREF
}
......@@ -48,7 +48,7 @@ public enum VCardProperty {
private final String name;
private VCardProperty() {
VCardProperty() {
name = super.toString().replace('_', '-');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment