From 7a08ab532fe0a40a8b6abca2d6aae4b9e688e6fc Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 10 Jul 2014 18:43:59 -0400 Subject: [PATCH] run code formatter on ManageReposActivity and RepoListActivity This should ease future comparisons after these two files are merged into one. --- .../fdroid/views/ManageReposActivity.java | 22 ++++++++++--------- .../views/fragments/RepoListFragment.java | 4 +++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/org/fdroid/fdroid/views/ManageReposActivity.java b/src/org/fdroid/fdroid/views/ManageReposActivity.java index 9e024f011..59dea2e8a 100644 --- a/src/org/fdroid/fdroid/views/ManageReposActivity.java +++ b/src/org/fdroid/fdroid/views/ManageReposActivity.java @@ -38,7 +38,6 @@ import android.widget.Toast; import org.fdroid.fdroid.FDroid; import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.R; -import org.fdroid.fdroid.R.string; import org.fdroid.fdroid.views.fragments.RepoListFragment; import java.util.Locale; @@ -47,9 +46,8 @@ public class ManageReposActivity extends ActionBarActivity { /** * If we have a new repo added, or the address of a repo has changed, then - * we when we're finished, we'll set this boolean to true in the intent - * that we finish with, to signify that we want the main list of apps - * updated. + * we when we're finished, we'll set this boolean to true in the intent that + * we finish with, to signify that we want the main list of apps updated. */ public static final String REQUEST_UPDATE = "update"; @@ -63,12 +61,16 @@ public class ManageReposActivity extends ActionBarActivity { FragmentManager fm = getSupportFragmentManager(); if (fm.findFragmentById(android.R.id.content) == null) { - // Need to set a dummy view (which will get overridden by the fragment manager - // below) so that we can call setContentView(). This is a work around for - // a (bug?) thing in 3.0, 3.1 which requires setContentView to be invoked before - // the actionbar is played with: - // http://blog.perpetumdesign.com/2011/08/strange-case-of-dr-action-and-mr-bar.html - setContentView( new LinearLayout(this) ); + /* + * Need to set a dummy view (which will get overridden by the + * fragment manager below) so that we can call setContentView(). + * This is a work around for a (bug?) thing in 3.0, 3.1 which + * requires setContentView to be invoked before the actionbar is + * played with: + * http://blog.perpetumdesign.com/2011/08/strange-case-of + * -dr-action-and-mr-bar.html + */ + setContentView(new LinearLayout(this)); listFragment = new RepoListFragment(); fm.beginTransaction() diff --git a/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java b/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java index 4c5738e6c..f0fb30131 100644 --- a/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java +++ b/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java @@ -30,6 +30,7 @@ import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; + import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.Preferences; import org.fdroid.fdroid.ProgressListener; @@ -44,12 +45,13 @@ import org.fdroid.fdroid.net.MDnsHelper.RepoScanListAdapter; import org.fdroid.fdroid.views.RepoAdapter; import org.fdroid.fdroid.views.RepoDetailsActivity; -import javax.jmdns.ServiceInfo; import java.net.MalformedURLException; import java.net.URL; import java.util.Date; import java.util.Locale; +import javax.jmdns.ServiceInfo; + public class RepoListFragment extends ListFragment implements LoaderManager.LoaderCallbacks, RepoAdapter.EnabledListener {