Style all switches equally, without indentation

This commit is contained in:
Daniel Martí 2015-04-16 18:41:39 +02:00
parent d6a8ef9e59
commit e1a6e2386f
15 changed files with 257 additions and 260 deletions

View File

@ -87,16 +87,14 @@ public abstract class FDroidProvider extends ContentProvider {
@Override
public String getType(Uri uri) {
String type;
switch(getMatcher().match(uri)) {
switch (getMatcher().match(uri)) {
case CODE_LIST:
type = "dir";
break;
case CODE_SINGLE:
default:
type = "item";
break;
}
return "vnd.android.cursor." + type + "/vnd." + AUTHORITY + "." + getProviderName();
}

View File

@ -105,7 +105,7 @@ public class LocalHTTPD extends NanoHTTPD {
private Response handlePost(IHTTPSession session) {
Uri uri = Uri.parse(session.getUri());
switch(uri.getPath()) {
switch (uri.getPath()) {
case "/request-swap":
if (!session.getParms().containsKey("repo")) {
Log.e(TAG, "Malformed /request-swap request to local repo HTTP server. Should have posted a 'repo' parameter." );

View File

@ -32,23 +32,22 @@ public class AppListFragmentPagerAdapter extends FragmentPagerAdapter {
@Override
public Fragment getItem(int i) {
if (i == 0) {
switch (i) {
case 0:
return new AvailableAppsFragment();
}
if (i == 1) {
case 1:
return new InstalledAppsFragment();
}
default:
return new CanUpdateAppsFragment();
}
}
@Override
public int getCount() {
return 3;
}
public int getCount() { return 3; }
@Override
public String getPageTitle(int i) {
switch(i) {
switch (i) {
case 0:
return parent.getString(R.string.tab_noninstalled);
case 1: