Use more switches
This commit is contained in:
parent
62f6fd3d44
commit
e20188b804
@ -12,14 +12,15 @@ public class MockCategoryResources extends MockFDroidResources {
|
||||
|
||||
@Override
|
||||
public String getString(int id) {
|
||||
if (id == R.string.category_All) {
|
||||
return "All";
|
||||
} else if (id == R.string.category_Recently_Updated) {
|
||||
return "Recently Updated";
|
||||
} else if (id == R.string.category_Whats_New) {
|
||||
return "Whats New";
|
||||
} else {
|
||||
return "";
|
||||
switch (id) {
|
||||
case R.string.category_All:
|
||||
return "All";
|
||||
case R.string.category_Recently_Updated:
|
||||
return "Recently Updated";
|
||||
case R.string.category_Whats_New:
|
||||
return "Whats New";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,16 +20,17 @@ public class MockFDroidResources extends MockResources {
|
||||
|
||||
@Override
|
||||
public int getInteger(int id) {
|
||||
if (id == R.integer.fdroid_repo_inuse) {
|
||||
return 1;
|
||||
} else if (id == R.integer.fdroid_archive_inuse) {
|
||||
return 0;
|
||||
} else if (id == R.integer.fdroid_repo_priority) {
|
||||
return 10;
|
||||
} else if (id == R.integer.fdroid_archive_priority) {
|
||||
return 20;
|
||||
} else {
|
||||
return 0;
|
||||
switch (id) {
|
||||
case R.integer.fdroid_repo_inuse:
|
||||
return 1;
|
||||
case R.integer.fdroid_archive_inuse:
|
||||
return 0;
|
||||
case R.integer.fdroid_repo_priority:
|
||||
return 10;
|
||||
case R.integer.fdroid_archive_priority:
|
||||
return 20;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user