* Fix github link: leonnib4 -> shkschneider

* Compatibility commit
  * match_parent -> fill_parent
  * Fix @Overrides
  * Fix .R imports
master
Alan SCHNEIDER 2012-04-22 21:36:58 +02:00
parent 56fc980bcf
commit 3eebe3eae0
14 changed files with 38 additions and 37 deletions

View File

@ -0,0 +1,5 @@
#Sun Apr 22 01:32:16 CEST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5

View File

@ -50,7 +50,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:singleLine="false" android:singleLine="false"
android:text="Released under the GNU General Public License 2.\nSource code available at leonnib4@github." android:text="Released under the GNU General Public License 2.\nSource code available at shkschneider@github."
android:textColor="@color/white" /> android:textColor="@color/white" />
</LinearLayout> </LinearLayout>
@ -110,7 +110,7 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="shk.schneider" /> android:text="shkschneider" />
<TextView <TextView
style="@style/content_page_small_text" style="@style/content_page_small_text"

View File

@ -10,7 +10,7 @@
<LinearLayout <LinearLayout
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:clickable="false" android:clickable="false"
@ -24,7 +24,7 @@
<TextView <TextView
android:id="@+id/superuser_status" android:id="@+id/superuser_status"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:text="" android:text=""
@ -35,7 +35,7 @@
<LinearLayout <LinearLayout
android:id="@+id/get_superuser" android:id="@+id/get_superuser"
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:orientation="horizontal" android:orientation="horizontal"
@ -64,7 +64,7 @@
<LinearLayout <LinearLayout
android:id="@+id/get_busybox" android:id="@+id/get_busybox"
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:orientation="horizontal" android:orientation="horizontal"
@ -92,7 +92,7 @@
<LinearLayout <LinearLayout
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:clickable="false" android:clickable="false"
@ -106,7 +106,7 @@
<TextView <TextView
android:id="@+id/dropbear_status" android:id="@+id/dropbear_status"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:text="" android:text=""
@ -117,7 +117,7 @@
<LinearLayout <LinearLayout
android:id="@+id/get_dropbear" android:id="@+id/get_dropbear"
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:orientation="horizontal" android:orientation="horizontal"
@ -145,7 +145,7 @@
<LinearLayout <LinearLayout
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:clickable="false" android:clickable="false"
@ -159,7 +159,7 @@
<TextView <TextView
android:id="@+id/server_status" android:id="@+id/server_status"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:text="" android:text=""
@ -168,7 +168,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:orientation="vertical" > android:orientation="vertical" >
@ -176,7 +176,7 @@
<LinearLayout <LinearLayout
android:id="@+id/server_launch" android:id="@+id/server_launch"
style="@style/list_item_single" style="@style/list_item_single"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:orientation="horizontal" > android:orientation="horizontal" >

View File

@ -5,6 +5,8 @@ package me.shkschneider.dropbearserver;
import com.markupartist.android.widget.ActionBar.Action; import com.markupartist.android.widget.ActionBar.Action;
import me.shkschneider.dropbearserver.R;
import android.content.Context; import android.content.Context;
import android.view.View; import android.view.View;
@ -16,12 +18,10 @@ class CheckAction implements Action {
mContext = context; mContext = context;
} }
@Override
public int getDrawable() { public int getDrawable() {
return R.drawable.ic_launcher; return R.drawable.ic_launcher;
} }
@Override
public void performAction(View view) { public void performAction(View view) {
((MainActivity) mContext).check(); ((MainActivity) mContext).check();
} }

View File

@ -5,6 +5,8 @@ package me.shkschneider.dropbearserver;
import com.markupartist.android.widget.ActionBar.Action; import com.markupartist.android.widget.ActionBar.Action;
import me.shkschneider.dropbearserver.R;
import android.content.Context; import android.content.Context;
import android.view.View; import android.view.View;
@ -16,12 +18,10 @@ class HomeAction implements Action {
mContext = context; mContext = context;
} }
@Override
public int getDrawable() { public int getDrawable() {
return R.drawable.ic_launcher; return R.drawable.ic_launcher;
} }
@Override
public void performAction(View view) { public void performAction(View view) {
((MainActivity) mContext).goToDefaultPage(); ((MainActivity) mContext).goToDefaultPage();
} }

View File

@ -3,19 +3,18 @@
*/ */
package me.shkschneider.dropbearserver; package me.shkschneider.dropbearserver;
import com.astuetz.viewpagertabs.ViewPagerTabProvider;
import me.shkschneider.dropbearserver.Pages.AboutPage; import me.shkschneider.dropbearserver.Pages.AboutPage;
import me.shkschneider.dropbearserver.Pages.HelpPage; import me.shkschneider.dropbearserver.Pages.HelpPage;
import me.shkschneider.dropbearserver.Pages.ServerPage; import me.shkschneider.dropbearserver.Pages.ServerPage;
import me.shkschneider.dropbearserver.Pages.SettingsPage; import me.shkschneider.dropbearserver.Pages.SettingsPage;
import android.content.Context; import android.content.Context;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.v4.view.PagerAdapter; import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.view.View; import android.view.View;
import com.astuetz.viewpagertabs.ViewPagerTabProvider;
public class MainAdapter extends PagerAdapter implements ViewPagerTabProvider { public class MainAdapter extends PagerAdapter implements ViewPagerTabProvider {
private static final int SETTINGS_INDEX = 0; private static final int SETTINGS_INDEX = 0;
@ -108,7 +107,6 @@ public class MainAdapter extends PagerAdapter implements ViewPagerTabProvider {
public void startUpdate(View container) { public void startUpdate(View container) {
} }
@Override
public String getTitle(int position) { public String getTitle(int position) {
final int len = mTitles.length; final int len = mTitles.length;
return (position >= 0 && position < len ? mTitles[position] : ""); return (position >= 0 && position < len ? mTitles[position] : "");

View File

@ -1,7 +1,8 @@
package me.shkschneider.dropbearserver.Pages; package me.shkschneider.dropbearserver.Pages;
import me.shkschneider.dropbearserver.R;
import me.shkschneider.dropbearserver.Utils.Utils; import me.shkschneider.dropbearserver.Utils.Utils;
import me.shkschneider.dropbearserver.R;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -46,7 +47,6 @@ public class AboutPage implements OnClickListener {
return mView; return mView;
} }
@Override
public void onClick(View v) { public void onClick(View v) {
if (v == mRateThisApp) { if (v == mRateThisApp) {
try { try {

View File

@ -1,6 +1,7 @@
package me.shkschneider.dropbearserver.Pages; package me.shkschneider.dropbearserver.Pages;
import me.shkschneider.dropbearserver.R; import me.shkschneider.dropbearserver.R;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -41,13 +42,12 @@ public class HelpPage implements OnClickListener {
return mView; return mView;
} }
@Override
public void onClick(View v) { public void onClick(View v) {
if (v == mWhatIsRoot) { if (v == mWhatIsRoot) {
mWhatisRootContent.setVisibility(mWhatisRootContent.getVisibility() == LinearLayout.VISIBLE ? LinearLayout.GONE : LinearLayout.VISIBLE); mWhatisRootContent.setVisibility(mWhatisRootContent.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
} }
else if (v == mWhatIsDropbear) { else if (v == mWhatIsDropbear) {
mWhatisDropbearContent.setVisibility(mWhatisDropbearContent.getVisibility() == LinearLayout.VISIBLE ? LinearLayout.GONE : LinearLayout.VISIBLE); mWhatisDropbearContent.setVisibility(mWhatisDropbearContent.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
} }
} }
} }

View File

@ -1,7 +1,6 @@
package me.shkschneider.dropbearserver.Pages; package me.shkschneider.dropbearserver.Pages;
import me.shkschneider.dropbearserver.MainActivity; import me.shkschneider.dropbearserver.MainActivity;
import me.shkschneider.dropbearserver.R;
import me.shkschneider.dropbearserver.Tasks.Checker; import me.shkschneider.dropbearserver.Tasks.Checker;
import me.shkschneider.dropbearserver.Tasks.CheckerCallback; import me.shkschneider.dropbearserver.Tasks.CheckerCallback;
import me.shkschneider.dropbearserver.Tasks.DropbearInstaller; import me.shkschneider.dropbearserver.Tasks.DropbearInstaller;
@ -13,6 +12,7 @@ import me.shkschneider.dropbearserver.Tasks.ServerStopperCallback;
import me.shkschneider.dropbearserver.Utils.RootUtils; import me.shkschneider.dropbearserver.Utils.RootUtils;
import me.shkschneider.dropbearserver.Utils.ServerUtils; import me.shkschneider.dropbearserver.Utils.ServerUtils;
import me.shkschneider.dropbearserver.Utils.Utils; import me.shkschneider.dropbearserver.Utils.Utils;
import me.shkschneider.dropbearserver.R;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
@ -178,7 +178,6 @@ public class ServerPage implements OnClickListener, DropbearInstallerCallback<Bo
return mView; return mView;
} }
@Override
public void onClick(View v) { public void onClick(View v) {
if (v == mServerLaunch) { if (v == mServerLaunch) {
switch (mServerStatusCode) { switch (mServerStatusCode) {
@ -239,7 +238,6 @@ public class ServerPage implements OnClickListener, DropbearInstallerCallback<Bo
} }
} }
@Override
public void onDropbearInstallerComplete(Boolean result) { public void onDropbearInstallerComplete(Boolean result) {
Log.i(TAG, "onDropbearInstallerComplete(" + result + ")"); Log.i(TAG, "onDropbearInstallerComplete(" + result + ")");
if (result == true) { if (result == true) {
@ -250,7 +248,6 @@ public class ServerPage implements OnClickListener, DropbearInstallerCallback<Bo
} }
} }
@Override
public void onServerStarterComplete(Boolean result) { public void onServerStarterComplete(Boolean result) {
Log.i(TAG, "onStartServerComplete(" + result + ")"); Log.i(TAG, "onStartServerComplete(" + result + ")");
if (result == true) { if (result == true) {
@ -262,7 +259,6 @@ public class ServerPage implements OnClickListener, DropbearInstallerCallback<Bo
updateServerStatus(); updateServerStatus();
} }
@Override
public void onServerStopperComplete(Boolean result) { public void onServerStopperComplete(Boolean result) {
Log.i(TAG, "onStopServerComplete(" + result + ")"); Log.i(TAG, "onStopServerComplete(" + result + ")");
if (result == true) { if (result == true) {
@ -274,7 +270,6 @@ public class ServerPage implements OnClickListener, DropbearInstallerCallback<Bo
updateServerStatus(); updateServerStatus();
} }
@Override
public void onCheckerComplete(Boolean result) { public void onCheckerComplete(Boolean result) {
update(); update();
((MainActivity) mContext).setActionBarProgressBarVisibility(View.GONE); ((MainActivity) mContext).setActionBarProgressBarVisibility(View.GONE);

View File

@ -1,10 +1,11 @@
package me.shkschneider.dropbearserver.Pages; package me.shkschneider.dropbearserver.Pages;
import me.shkschneider.dropbearserver.MainActivity; import me.shkschneider.dropbearserver.MainActivity;
import me.shkschneider.dropbearserver.R;
import me.shkschneider.dropbearserver.Tasks.DropbearRemover; import me.shkschneider.dropbearserver.Tasks.DropbearRemover;
import me.shkschneider.dropbearserver.Tasks.DropbearRemoverCallback; import me.shkschneider.dropbearserver.Tasks.DropbearRemoverCallback;
import me.shkschneider.dropbearserver.Utils.RootUtils; import me.shkschneider.dropbearserver.Utils.RootUtils;
import me.shkschneider.dropbearserver.R;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
@ -53,7 +54,6 @@ public class SettingsPage implements OnClickListener, DialogInterface.OnClickLis
return mView; return mView;
} }
@Override
public void onClick(View v) { public void onClick(View v) {
// mGeneral // mGeneral
if (v == mGeneral) { if (v == mGeneral) {
@ -74,7 +74,6 @@ public class SettingsPage implements OnClickListener, DialogInterface.OnClickLis
} }
} }
@Override
public void onClick(DialogInterface dialog, int button) { public void onClick(DialogInterface dialog, int button) {
if (button == DialogInterface.BUTTON_POSITIVE) { if (button == DialogInterface.BUTTON_POSITIVE) {
// mDropbearRemover // mDropbearRemover
@ -83,7 +82,6 @@ public class SettingsPage implements OnClickListener, DialogInterface.OnClickLis
} }
} }
@Override
public void onDropbearRemoverComplete(Boolean result) { public void onDropbearRemoverComplete(Boolean result) {
if (result == true) { if (result == true) {
RootUtils.hasDropbear = false; RootUtils.hasDropbear = false;

View File

@ -1,8 +1,8 @@
package me.shkschneider.dropbearserver.Tasks; package me.shkschneider.dropbearserver.Tasks;
import me.shkschneider.dropbearserver.R;
import me.shkschneider.dropbearserver.Utils.ShellUtils; import me.shkschneider.dropbearserver.Utils.ShellUtils;
import me.shkschneider.dropbearserver.Utils.Utils; import me.shkschneider.dropbearserver.Utils.Utils;
import me.shkschneider.dropbearserver.R;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Context; import android.content.Context;

View File

@ -1,7 +1,9 @@
package me.shkschneider.dropbearserver.Utils; package me.shkschneider.dropbearserver.Utils;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import android.util.Log; import android.util.Log;
import com.stericson.RootTools.RootTools; import com.stericson.RootTools.RootTools;
public abstract class RootUtils public abstract class RootUtils

View File

@ -9,6 +9,7 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import android.util.Log; import android.util.Log;
import com.stericson.RootTools.RootTools; import com.stericson.RootTools.RootTools;
public abstract class ShellUtils public abstract class ShellUtils

View File

@ -4,9 +4,11 @@ import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import android.content.Context; import android.content.Context;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import com.stericson.RootTools.RootTools; import com.stericson.RootTools.RootTools;
public abstract class Utils public abstract class Utils