From e1058ba46de6c0bb779edc3783a33d422f4d4baf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=AD?= <mvdan@mvdan.cc>
Date: Sat, 2 Jan 2016 19:19:16 +0100
Subject: [PATCH] Remove unused classes

These were useful at some point, but stopped being used some time ago.
Should have been removed then.
---
 .../src/org/fdroid/fdroid/SearchResults.java  | 91 -------------------
 .../fdroid/fdroid/compat/SwitchCompat.java    | 51 -----------
 2 files changed, 142 deletions(-)
 delete mode 100644 F-Droid/src/org/fdroid/fdroid/SearchResults.java
 delete mode 100644 F-Droid/src/org/fdroid/fdroid/compat/SwitchCompat.java

diff --git a/F-Droid/src/org/fdroid/fdroid/SearchResults.java b/F-Droid/src/org/fdroid/fdroid/SearchResults.java
deleted file mode 100644
index 8398a266e..000000000
--- a/F-Droid/src/org/fdroid/fdroid/SearchResults.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2011-13  Ciaran Gultnieks, ciaran@ciarang.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-package org.fdroid.fdroid;
-
-import android.content.Intent;
-import android.os.Build;
-import android.os.Bundle;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.NavUtils;
-import android.support.v7.app.ActionBarActivity;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.widget.LinearLayout;
-
-import org.fdroid.fdroid.views.fragments.SearchResultsFragment;
-
-public class SearchResults extends ActionBarActivity {
-
-    private static final int SEARCH = Menu.FIRST;
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-
-        ((FDroidApp) getApplication()).applyTheme(this);
-        super.onCreate(savedInstanceState);
-
-        // Start a search by just typing
-        setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
-
-        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
-            if (Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 13) {
-                setContentView(new LinearLayout(this));
-            }
-
-            SearchResultsFragment fragment = new SearchResultsFragment();
-            fm.beginTransaction().add(android.R.id.content, fragment).commit();
-        }
-
-        // Actionbar cannot be accessed until after setContentView (on 3.0 and 3.1 devices)
-        // see: http://blog.perpetumdesign.com/2011/08/strange-case-of-dr-action-and-mr-bar.html
-        // for reason why.
-        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
-
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        super.onNewIntent(intent);
-        setIntent(intent);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-
-            case android.R.id.home:
-                NavUtils.navigateUpFromSameTask(this);
-                return true;
-
-            case SEARCH:
-                onSearchRequested();
-                return true;
-
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-}
diff --git a/F-Droid/src/org/fdroid/fdroid/compat/SwitchCompat.java b/F-Droid/src/org/fdroid/fdroid/compat/SwitchCompat.java
deleted file mode 100644
index 555411c57..000000000
--- a/F-Droid/src/org/fdroid/fdroid/compat/SwitchCompat.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.fdroid.fdroid.compat;
-
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.widget.CompoundButton;
-import android.widget.Switch;
-import android.widget.ToggleButton;
-
-public abstract class SwitchCompat extends Compatibility {
-
-    protected final Context context;
-
-    protected SwitchCompat(Context context) {
-        this.context = context;
-    }
-
-    public abstract CompoundButton createSwitch();
-
-    public static SwitchCompat create(Context context) {
-        if (hasApi(14)) {
-            return new IceCreamSwitch(context);
-        }
-        return new OldSwitch(context);
-    }
-
-}
-
-@TargetApi(14)
-class IceCreamSwitch extends SwitchCompat {
-
-    protected IceCreamSwitch(Context context) {
-        super(context);
-    }
-
-    @Override
-    public CompoundButton createSwitch() {
-        return new Switch(context);
-    }
-}
-
-class OldSwitch extends SwitchCompat {
-
-    protected OldSwitch(Context context) {
-        super(context);
-    }
-
-    @Override
-    public CompoundButton createSwitch() {
-        return new ToggleButton(context);
-    }
-}