mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Made some inner classes static (For Efficiency)
(and made one explicitly private) Closes #3932 // FREEBIE
This commit is contained in:
parent
d0fc5268a6
commit
99adbe5784
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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());
|
||||
|
@ -181,7 +181,7 @@ public class EmojiProvider {
|
||||
public void setColorFilter(ColorFilter cf) { }
|
||||
}
|
||||
|
||||
class DrawInfo {
|
||||
private static class DrawInfo {
|
||||
EmojiPageBitmap page;
|
||||
int index;
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class IdentityDatabase extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
public class Identity {
|
||||
public static class Identity {
|
||||
private final Recipients recipients;
|
||||
private final IdentityKey identityKey;
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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"));
|
||||
|
@ -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);}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user