mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-18 19:59:00 +00:00
Ensured constants are static final (and private if possible)
This commit is contained in:
parent
52018f7009
commit
f64d831e77
9 changed files with 21 additions and 21 deletions
|
|
@ -23,7 +23,7 @@ import java.util.Set;
|
|||
public class HabiticaPurchaseVerifier extends BasePurchaseVerifier {
|
||||
|
||||
private Set<String> purchasedOrderList = new HashSet<>();
|
||||
static String PURCHASED_PRODUCTS_KEY = "PURCHASED_PRODUCTS";
|
||||
private static final String PURCHASED_PRODUCTS_KEY = "PURCHASED_PRODUCTS";
|
||||
private SharedPreferences preferences;
|
||||
|
||||
public HabiticaPurchaseVerifier(Context context) {
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ import de.greenrobot.event.EventBus;
|
|||
* Created by Negue on 20.08.2015.
|
||||
*/
|
||||
public class ChatRecyclerViewAdapter extends RecyclerView.Adapter<ChatRecyclerViewAdapter.ChatRecyclerViewHolder> {
|
||||
static final int TYPE_DANIEL = 0;
|
||||
static final int TYPE_NEW_MESSAGE = 1;
|
||||
static final int TYPE_MESSAGE = 2;
|
||||
private static final int TYPE_DANIEL = 0;
|
||||
private static final int TYPE_NEW_MESSAGE = 1;
|
||||
private static final int TYPE_MESSAGE = 2;
|
||||
|
||||
private List<ChatMessage> messages;
|
||||
private Context viewContext;
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ public class HabitItemRecyclerViewAdapter<THabitItem extends Task>
|
|||
Context context;
|
||||
public int dailyResetOffset;
|
||||
|
||||
static final int TYPE_HEADER = 0;
|
||||
static final int TYPE_CELL = 1;
|
||||
private static final int TYPE_HEADER = 0;
|
||||
private static final int TYPE_CELL = 1;
|
||||
private RecyclerView.Adapter<ViewHolder> parentAdapter;
|
||||
private TagsHelper tagsHelper;
|
||||
private IAdditionalEntries additionalEntries;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class SkillTasksRecyclerViewAdapter extends RecyclerView.Adapter<SkillTas
|
|||
private ObservableArrayList<Task> observableContent;
|
||||
SkillTasksActivity activity;
|
||||
|
||||
static final int TYPE_CELL = 1;
|
||||
private static final int TYPE_CELL = 1;
|
||||
private RecyclerView.Adapter<ViewHolder> parentAdapter;
|
||||
|
||||
public SkillTasksRecyclerViewAdapter(String taskType, SkillTasksActivity activity) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import io.fabric.sdk.android.Fabric;
|
|||
*/
|
||||
public class GemsPurchaseFragment extends BaseFragment {
|
||||
|
||||
static final int GEMS_TO_ADD = 21;
|
||||
private static final int GEMS_TO_ADD = 21;
|
||||
|
||||
private BillingRequests billingRequests;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ import retrofit.client.Response;
|
|||
|
||||
public class TasksFragment extends BaseFragment implements OnCheckedChangeListener {
|
||||
|
||||
static final int TASK_CREATED_RESULT = 1;
|
||||
static final int TASK_UPDATED_RESULT = 2;
|
||||
private static final int TASK_CREATED_RESULT = 1;
|
||||
private static final int TASK_UPDATED_RESULT = 2;
|
||||
|
||||
public ViewPager viewPager;
|
||||
Drawer filterDrawer;
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
public class UserPicture {
|
||||
|
||||
static Integer width = 140;
|
||||
static Integer height = 147;
|
||||
static Integer compactWidth = 103;
|
||||
static Integer compactHeight = 90;
|
||||
private static final Integer width = 140;
|
||||
private static final Integer height = 147;
|
||||
private static final Integer compactWidth = 103;
|
||||
private static final Integer compactHeight = 90;
|
||||
|
||||
private HabitRPGUser user;
|
||||
private ImageView imageView;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import java.util.HashMap;
|
|||
*/
|
||||
public class ChatMessage {
|
||||
|
||||
static HashMap<Integer, Integer> contributorColorDict;
|
||||
private static final HashMap<Integer, Integer> contributorColorDict;
|
||||
|
||||
static {
|
||||
contributorColorDict = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ import java.util.concurrent.TimeUnit;
|
|||
@ModelContainer
|
||||
@Table(databaseName = HabitDatabase.NAME)
|
||||
public class Task extends BaseModel {
|
||||
public static String TYPE_HABIT = "habit";
|
||||
public static String TYPE_TODO = "todo";
|
||||
public static String TYPE_DAILY = "daily";
|
||||
public static String TYPE_REWARD = "reward";
|
||||
public static String FREQUENCY_WEEKLY = "weekly";
|
||||
public static String FREQUENCY_DAILY = "daily";
|
||||
public static final String TYPE_HABIT = "habit";
|
||||
public static final String TYPE_TODO = "todo";
|
||||
public static final String TYPE_DAILY = "daily";
|
||||
public static final String TYPE_REWARD = "reward";
|
||||
public static final String FREQUENCY_WEEKLY = "weekly";
|
||||
public static final String FREQUENCY_DAILY = "daily";
|
||||
|
||||
|
||||
@Column
|
||||
|
|
|
|||
Loading…
Reference in a new issue