Made some inner classes static (For Efficiency)

(and made one explicitly private)

Closes #3932
// FREEBIE
This commit is contained in:
Sam Lanning 2015-08-13 00:22:08 +01:00 committed by Moxie Marlinspike
parent d0fc5268a6
commit 99adbe5784
12 changed files with 12 additions and 12 deletions

View File

@ -184,7 +184,7 @@ public class DatabaseMigrationActivity extends PassphraseRequiredActionBarActivi
}
}
private class NullReceiver extends BroadcastReceiver {
private static class NullReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
abortBroadcast();

View File

@ -67,7 +67,7 @@ public class GroupMembersDialog extends AsyncTask<Void, Void, Recipients> {
else onPostExecute(recipients);
}
private class GroupMembersOnClickListener implements DialogInterface.OnClickListener {
private static class GroupMembersOnClickListener implements DialogInterface.OnClickListener {
private final GroupMembers groupMembers;
private final Context context;

View File

@ -434,7 +434,7 @@ public class RegistrationProgressActivity extends BaseActionBarActivity {
}
}
private class RegistrationReceiver extends BroadcastReceiver {
private static class RegistrationReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
abortBroadcast();

View File

@ -312,7 +312,7 @@ public class ThumbnailView extends FrameLayout {
void onClick(View v, Slide slide);
}
private class ThumbnailClickDispatcher implements View.OnClickListener {
private static class ThumbnailClickDispatcher implements View.OnClickListener {
private ThumbnailClickListener listener;
private Slide slide;

View File

@ -441,7 +441,7 @@ public class CameraView extends FrameLayout {
ApplicationContext.getInstance(getContext()).getJobManager().add(job);
}
private abstract class SerializedAsyncTask<Result> extends Job {
private static abstract class SerializedAsyncTask<Result> extends Job {
public SerializedAsyncTask() {
super(JobParameters.newBuilder().withGroupId(CameraView.class.getSimpleName()).create());

View File

@ -181,7 +181,7 @@ public class EmojiProvider {
public void setColorFilter(ColorFilter cf) { }
}
class DrawInfo {
private static class DrawInfo {
EmojiPageBitmap page;
int index;

View File

@ -142,7 +142,7 @@ public class IdentityDatabase extends Database {
}
}
public class Identity {
public static class Identity {
private final Recipients recipients;
private final IdentityKey identityKey;

View File

@ -201,7 +201,7 @@ public class TextSecureDirectory {
}
}
private class DatabaseHelper extends SQLiteOpenHelper {
private static class DatabaseHelper extends SQLiteOpenHelper {
public DatabaseHelper(Context context, String name,
SQLiteDatabase.CursorFactory factory,

View File

@ -38,7 +38,7 @@ public class CountryListLoader extends AsyncTaskLoader<ArrayList<Map<String, Str
return results;
}
private class RegionComparator implements Comparator<Map<String, String>> {
private static class RegionComparator implements Comparator<Map<String, String>> {
@Override
public int compare(Map<String, String> lhs, Map<String, String> rhs) {
return lhs.get("country_name").compareTo(rhs.get("country_name"));

View File

@ -153,7 +153,7 @@ public class AttachmentDownloadJob extends MasterSecretJob implements Injectable
}
}
private class InvalidPartException extends Exception {
private static class InvalidPartException extends Exception {
public InvalidPartException(Exception e) {super(e);}
}

View File

@ -183,7 +183,7 @@ public class ApplicationMigrationService extends Service
}
}
private class CompletedReceiver extends BroadcastReceiver {
private static class CompletedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);

View File

@ -20,7 +20,7 @@ public abstract class CharacterCalculator {
public abstract CharacterState calculateCharacters(int charactersSpent);
public class CharacterState {
public static class CharacterState {
public int charactersRemaining;
public int messagesSpent;
public int maxMessageSize;