Skip to content

Commit

Permalink
Since so many bugs have been fixed, doing a release as 1.2.2, before …
Browse files Browse the repository at this point in the history
…the 1.3 work.
  • Loading branch information
jp-bennett committed Sep 13, 2016
1 parent fd3c1a4 commit 8981aea
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 24 deletions.
18 changes: 9 additions & 9 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/renderscript" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/null/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/renderscript" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/null/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/renderscript" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/renderscript" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/binaries" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ model {
applicationId = "org.cipherdyne.fwknop2"
minSdkVersion.apiLevel = 16
targetSdkVersion.apiLevel = 24
versionCode = 27
versionCode = 31
versionName = "1.2.2"
}
//lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
} else if (id == R.id.qr_code) {
try {
IntentIntegrator.forSupportFragment(this).setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES).initiateScan();
} catch (Exception e) { // This is where the play store is called if the app is not installed
} catch (Throwable e) { // This is where the play store is called if the app is not installed

}
} else if (id == R.id.save) {
Expand Down Expand Up @@ -352,11 +352,21 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) { //
@Override //This is all the setup stuff for this fragment.
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

Thread.setDefaultUncaughtExceptionHandler(
new Thread.UncaughtExceptionHandler() {
@Override public void uncaughtException(Thread t, Throwable e) {
Log.e("fwknop2", t.getName()+": "+e);
//MyWorker worker = new MyWorker();
//worker.start();
}
});

View rootView = inflater.inflate(R.layout.fragment_config_detail, container, false);
active_Nick = getArguments().getString("item_id");
try {
myJuice = new PluginContract();
} catch (Exception e) {
} catch (Throwable e) {
Log.e("fwknop2", "Juicessh exception");
}

Expand Down Expand Up @@ -458,8 +468,12 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean ischecked) {
new String[]{"com.sonelli.juicessh.api.v1.permission.READ_CONNECTIONS", "com.sonelli.juicessh.api.v1.permission.OPEN_SESSIONS"},
0);
}
juice_adapt = new ConnectionSpinnerAdapter(getActivity());
spn_juice.setAdapter(juice_adapt);
try {
juice_adapt = new ConnectionSpinnerAdapter(getActivity());
spn_juice.setAdapter(juice_adapt);
} catch (Throwable ex) {
Log.e("fwknop2", "Juicessh error");
}
} else {
list.remove(3);
adapter_ssh.notifyDataSetChanged();
Expand Down Expand Up @@ -507,7 +521,7 @@ public void onLoaded() { // This is so ugly...
} else {
getActivity().getSupportLoaderManager().restartLoader(0, null, connectionListLoader);
}
} catch (Exception e) {
} catch (Throwable e) {
Log.e("fwknop2", "Juicessh error");
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.util.Log;

import com.sonelli.juicessh.pluginlibrary.PluginContract;

Expand Down Expand Up @@ -36,6 +37,7 @@ public void setOnLoadedListener(OnLoadedListener listener) {

@Override
public Loader<Cursor> onCreateLoader(int id, Bundle bundle) {
try {
return new CursorLoader(
context,
PluginContract.Connections.CONTENT_URI,
Expand All @@ -44,6 +46,10 @@ public Loader<Cursor> onCreateLoader(int id, Bundle bundle) {
null,
PluginContract.Connections.SORT_ORDER_DEFAULT
);
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}
return null;

}

Expand All @@ -54,12 +60,16 @@ public Loader<Cursor> onCreateLoader(int id, Bundle bundle) {
*/
@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
try {
if (adapter != null) {
adapter.swapCursor(cursor);
if (listener != null) {
listener.onLoaded();
}
}
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}
}

/**
Expand All @@ -69,8 +79,12 @@ public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
*/
@Override
public void onLoaderReset(Loader<Cursor> cursorLoader) {
try {
if (adapter != null) {
adapter.swapCursor(null);
}
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.Context;
import android.database.Cursor;
import android.support.v4.widget.CursorAdapter;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -30,8 +31,13 @@ public class ConnectionSpinnerAdapter extends CursorAdapter {
* @param context Context used to inflate layout
*/
public ConnectionSpinnerAdapter(Context context) {
super(context, null, false);
this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

super(context, null, false);
try {
this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
} catch (Throwable e) {
Log.e("fwknop2", "Juice Error");
}
}

/**
Expand All @@ -43,14 +49,17 @@ public ConnectionSpinnerAdapter(Context context) {
public UUID getConnectionId(int position) {

UUID id = null;

if (getCursor() != null) {
if(getCursor().moveToPosition(position)) {
int idIndex = getCursor().getColumnIndex(PluginContract.Connections.COLUMN_ID);
if (idIndex > -1) {
id = UUID.fromString(getCursor().getString(idIndex));
try {
if (getCursor() != null) {
if (getCursor().moveToPosition(position)) {
int idIndex = getCursor().getColumnIndex(PluginContract.Connections.COLUMN_ID);
if (idIndex > -1) {
id = UUID.fromString(getCursor().getString(idIndex));
}
}
}
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}

return id;
Expand All @@ -66,7 +75,7 @@ public UUID getConnectionId(int position) {
public String getConnectionName(int position) {

String name = null;

try {
if (getCursor() != null) {
if(getCursor().moveToPosition(position)) {
int idIndex = getCursor().getColumnIndex(PluginContract.Connections.COLUMN_NAME);
Expand All @@ -75,6 +84,9 @@ public String getConnectionName(int position) {
}
}
}
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}

return name;
}
Expand All @@ -86,11 +98,17 @@ public boolean areAllItemsEnabled() {

@Override
public View newView(Context context, Cursor cursor, ViewGroup viewGroup) {
try {
return inflater.inflate(R.layout.spinner_list_item, null, false);
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}
return null;
}

@Override
public void bindView(View view, final Context context, Cursor cursor) {
try {

int nameColumn = cursor.getColumnIndex(PluginContract.Connections.COLUMN_NAME);

Expand All @@ -101,6 +119,9 @@ public void bindView(View view, final Context context, Cursor cursor) {
textView.setText(name);

}
} catch (Throwable ex) {
Log.e("fwknop2", "Juice error");
}

}

Expand Down

0 comments on commit 8981aea

Please sign in to comment.