Skip to content

Commit

Permalink
Exposed new send unicode setting in advanced settings and default set…
Browse files Browse the repository at this point in the history
…tings.

New version v5.0.7, incremented build code to 115070. Changelog update.
  • Loading branch information
iiordanov committed Mar 8, 2022
1 parent 3770e25 commit 11a9fe5
Show file tree
Hide file tree
Showing 40 changed files with 194 additions and 71 deletions.
4 changes: 2 additions & 2 deletions CustomVnc-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.iiordanov.CUSTOM_VNC_APP_PACKAGE_NAME"
android:installLocation="auto"
android:versionCode="115067"
android:versionName="v5.0.6">
android:versionCode="115070"
android:versionName="v5.0.7">

<uses-permission tools:node="removeAll" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
4 changes: 2 additions & 2 deletions Opaque-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.undatech.opaque"
android:versionCode="115067"
android:versionName="v5.0.6">
android:versionCode="115070"
android:versionName="v5.0.7">

<uses-feature android:name="android.hardware.usb.host" />
<uses-sdk android:minSdkVersion="12" />
Expand Down
4 changes: 2 additions & 2 deletions aRDP-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.iiordanov.aRDP"
android:installLocation="auto"
android:versionCode="115067"
android:versionName="v5.0.6">
android:versionCode="115070"
android:versionName="v5.0.7">

<uses-permission tools:node="removeAll" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
4 changes: 2 additions & 2 deletions aSPICE-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.iiordanov.aSPICE"
android:installLocation="auto"
android:versionCode="115067"
android:versionName="v5.0.6">
android:versionCode="115070"
android:versionName="v5.0.7">

<uses-feature android:name="android.hardware.usb.host" />
<uses-sdk android:minSdkVersion="12" />
Expand Down
4 changes: 2 additions & 2 deletions bVNC-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.iiordanov.bVNC"
android:installLocation="auto"
android:versionCode="115067"
android:versionName="v5.0.6">
android:versionCode="115070"
android:versionName="v5.0.7">

<uses-permission tools:node="removeAll" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
3 changes: 2 additions & 1 deletion bVNC/CHANGELOG-Opaque
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v5.0.7
- Finer-grained permissions requests
v5.0.6
- Updated Target API to 31
- USB Redirection Support
Expand All @@ -6,7 +8,6 @@ v5.0.6
- Capture modifier keys on Samsung devices
- Theme visual improvements
- Fix for Chromebook when app is on external display
- Finer-grained permissions requests
v5.0.5
- Added Portuguese translation
- Disabled highlighting of canvasing when focused so colors are not washed out
Expand Down
7 changes: 4 additions & 3 deletions bVNC/CHANGELOG-aRDP
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
v5.0.7
- Finer-grained permissions requests
- Fix for layouts including QWERTZ, AZERTY
- FreeRDP Upgrade
v5.0.6
- Updated Target API to 31
- Capture modifier keys on Samsung devices
- Theme visual improvements
- Fix for Chromebook when app is on external display
- Finer-grained permissions requests
- Fix for layouts including QWERTZ, AZERTY
- FreeRDP Upgrade
v5.0.5
- Added Portuguese translation
- Disabled highlighting of canvasing when focused so colors are not washed out
Expand Down
2 changes: 2 additions & 0 deletions bVNC/CHANGELOG-aSPICE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v5.0.7
- Finer-grained permissions requests
v5.0.6
- Updated Target API to 31
- USB Redirection Support for Pro
Expand Down
2 changes: 2 additions & 0 deletions bVNC/CHANGELOG-bVNC
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v5.0.7
- Finer-grained permissions requests
v5.0.6
- Updated Target API to 31
- Capture modifier keys on Samsung devices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public abstract class AbstractConnectionBean extends com.antlersoft.android.dbimpl.IdImplementationBase implements IConnectionBean {

public static final String GEN_TABLE_NAME = "CONNECTION_BEAN";
public static final int GEN_COUNT = 81;
public static final int GEN_COUNT = 82;

// Field constants
public static final String GEN_FIELD__ID = "_id";
Expand Down Expand Up @@ -174,6 +174,9 @@ public abstract class AbstractConnectionBean extends com.antlersoft.android.dbim
public static final String GEN_FIELD_ENABLEGFXH264 = "ENABLEGFXH264";
public static final int GEN_ID_ENABLEGFXH264 = 80;

public static final String GEN_FIELD_PREFERSENDINGUNICODE = "PREFERSENDINGUNICODE";
public static final int GEN_ID_PREFERSENDINGUNICODE = 81;

// SQL Command for creating the table
public static String GEN_CREATE = "CREATE TABLE CONNECTION_BEAN (" +
"_id INTEGER PRIMARY KEY AUTOINCREMENT," +
Expand Down Expand Up @@ -343,6 +346,7 @@ public abstract class AbstractConnectionBean extends com.antlersoft.android.dbim

private boolean gen_enableGfx;
private boolean gen_enableGfxH264;
private boolean gen_preferSendingUnicode;

public String Gen_tableName() { return GEN_TABLE_NAME; }

Expand Down Expand Up @@ -511,6 +515,8 @@ public abstract class AbstractConnectionBean extends com.antlersoft.android.dbim
public void setEnableGfx(boolean arg_enableGfx) { gen_enableGfx = arg_enableGfx; }
public boolean getEnableGfxH264() { return gen_enableGfxH264; }
public void setEnableGfxH264(boolean arg_enableGfxH264) { gen_enableGfxH264 = arg_enableGfxH264; }
public boolean getPreferSendingUnicode() { return gen_preferSendingUnicode; }
public void setPreferSendingUnicode(boolean arg_preferSendingUnicode) { gen_preferSendingUnicode = arg_preferSendingUnicode; }

public android.content.ContentValues Gen_getValues() {
android.content.ContentValues values=new android.content.ContentValues();
Expand Down Expand Up @@ -598,6 +604,8 @@ public android.content.ContentValues Gen_getValues() {
values.put(GEN_FIELD_ENABLEGFX,(this.gen_enableGfx ? "1" : "0"));
values.put(GEN_FIELD_ENABLEGFXH264,(this.gen_enableGfxH264 ? "1" : "0"));

values.put(GEN_FIELD_PREFERSENDINGUNICODE,(this.gen_preferSendingUnicode ? "1" : "0"));

return values;
}

Expand Down Expand Up @@ -695,6 +703,8 @@ public int[] Gen_columnIndices(android.database.Cursor cursor) {

result[79] = cursor.getColumnIndex(GEN_FIELD_ENABLEGFX);
result[80] = cursor.getColumnIndex(GEN_FIELD_ENABLEGFXH264);

result[81] = cursor.getColumnIndex(GEN_FIELD_PREFERSENDINGUNICODE);
return result;
}

Expand Down Expand Up @@ -947,6 +957,9 @@ public void Gen_populate(android.database.Cursor cursor,int[] columnIndices) {
if ( columnIndices[GEN_ID_ENABLEGFXH264] >= 0 && ! cursor.isNull(columnIndices[GEN_ID_ENABLEGFXH264])) {
gen_enableGfxH264 = (cursor.getInt(columnIndices[GEN_ID_ENABLEGFXH264]) != 0);
}
if ( columnIndices[GEN_ID_PREFERSENDINGUNICODE] >= 0 && ! cursor.isNull(columnIndices[GEN_ID_PREFERSENDINGUNICODE])) {
gen_preferSendingUnicode = (cursor.getInt(columnIndices[GEN_ID_PREFERSENDINGUNICODE]) != 0);
}
}

/**
Expand Down Expand Up @@ -1036,5 +1049,7 @@ public void Gen_populate(android.content.ContentValues values) {

gen_enableGfx = (values.getAsInteger(GEN_FIELD_ENABLEGFX) != 0);
gen_enableGfxH264 = (values.getAsInteger(GEN_FIELD_ENABLEGFXH264) != 0);

gen_preferSendingUnicode = (values.getAsInteger(GEN_FIELD_PREFERSENDINGUNICODE) != 0);
}
}
13 changes: 11 additions & 2 deletions bVNC/src/main/java/com/iiordanov/bVNC/ConnectionBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,24 @@ public class ConnectionBean extends AbstractConnectionBean implements Connection
public static final NewInstance<ConnectionBean> newInstance=new NewInstance<ConnectionBean>() {
public ConnectionBean get() { return new ConnectionBean(c); }
};

ConnectionBean(Context context)
{
String inputMode = InputHandlerDirectSwipePan.ID;
Boolean preferSendingUnicode = false;

if (context == null) {
context = App.getContext();
}

if (context != null) {
inputMode = Utils.querySharedPreferenceString(context, Constants.defaultInputMethodTag,
InputHandlerDirectSwipePan.ID);
preferSendingUnicode = Utils.querySharedPreferenceBoolean(context, Constants.preferSendingUnicode);
} else {
android.util.Log.w(TAG, "Failed to query default input method, context is null.");
android.util.Log.e(TAG, "Failed to query defaults from shared preferences, context is null.");
}

set_Id(0);
setAddress("");
setPassword("");
Expand Down Expand Up @@ -148,6 +157,7 @@ public class ConnectionBean extends AbstractConnectionBean implements Connection

setEnableGfx(false);
setEnableGfxH264(false);
setPreferSendingUnicode(preferSendingUnicode);
c = context;

// These two are not saved in the database since we always save the cert data.
Expand All @@ -159,7 +169,6 @@ public class ConnectionBean extends AbstractConnectionBean implements Connection
setUseLastPositionToolbarX(0);
setUseLastPositionToolbarY(0);
setUseLastPositionToolbarMoved(false);

}

public int getIdHashAlgorithm() {
Expand Down
1 change: 1 addition & 0 deletions bVNC/src/main/java/com/iiordanov/bVNC/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public class Constants {
public static final String defaultInputMethodTag = "defaultInputMethod";
public static final String permissionsRequested = "permissionsRequested";
public static final String positionToolbarLastUsed = "positionToolbarLastUsed";
public static final String preferSendingUnicode = "preferSendingUnicode";

public static final String ACTION_USB_PERMISSION = "com.iiordanov.aSPICE.USB_PERMISSION";
public static final int usbDeviceTimeout = 5000;
Expand Down
10 changes: 9 additions & 1 deletion bVNC/src/main/java/com/iiordanov/bVNC/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public class Database extends SQLiteOpenHelper {
static final int DBV_2_1_5 = 374;
static final int DBV_2_1_6 = 431;
static final int DBV_2_1_7 = 501;
static final int CURRVERS = DBV_2_1_7;
static final int DBV_2_1_8 = 507;
static final int CURRVERS = DBV_2_1_8;
private static String dbName = "VncDatabase";
private static String password = "";

Expand Down Expand Up @@ -377,5 +378,12 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
oldVersion = DBV_2_1_7;
}

if (oldVersion == DBV_2_1_7) {
Log.i(TAG,"Doing upgrade from 501 to 507");
db.execSQL("ALTER TABLE " + AbstractConnectionBean.GEN_TABLE_NAME + " ADD COLUMN "
+AbstractConnectionBean.GEN_FIELD_PREFERSENDINGUNICODE + " BOOLEAN DEFAULT FALSE");
oldVersion = DBV_2_1_8;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ public class GlobalPreferencesFragment extends PreferenceFragmentCompat {
public void onCreatePreferences(Bundle bundle, String s) {
getPreferenceManager().setSharedPreferencesName(Constants.generalSettingsTag);
setPreferencesFromResource(R.xml.global_preferences, s);
if (Utils.isVnc(getContext())) {
addPreferencesFromResource(R.xml.global_preferences_vnc);
} else if (Utils.isRdp(getContext())) {
addPreferencesFromResource(R.xml.global_preferences_rdp);
} else if (Utils.isSpice(getContext())) {
addPreferencesFromResource(R.xml.global_preferences_spice);
}
}
}
3 changes: 2 additions & 1 deletion bVNC/src/main/java/com/iiordanov/bVNC/RemoteCanvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ private void initializeRdpConnection() throws Exception {
App.debugLog);
rfbconn = rdpcomm;
pointer = new RemoteRdpPointer(rfbconn, RemoteCanvas.this, handler);
keyboard = new RemoteRdpKeyboard(rfbconn, RemoteCanvas.this, handler, App.debugLog);
keyboard = new RemoteRdpKeyboard(rfbconn, RemoteCanvas.this, handler, App.debugLog,
connection.getPreferSendingUnicode());
}

/**
Expand Down
8 changes: 5 additions & 3 deletions bVNC/src/main/java/com/iiordanov/bVNC/aRDP.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class aRDP extends MainConfiguration {
private CheckBox checkboxUseSshPubkey;
private CheckBox checkboxEnableGfx;
private CheckBox checkboxEnableGfxH264;
private CheckBox checkboxPreferSendingUnicode;

@Override
public void onCreate(Bundle icicle) {
Expand Down Expand Up @@ -153,6 +154,7 @@ public void onNothingSelected(AdapterView<?> arg0) {
checkboxVisualStyles = (CheckBox)findViewById(R.id.checkboxVisualStyles);
checkboxEnableGfx = (CheckBox)findViewById(R.id.checkboxEnableGfx);
checkboxEnableGfxH264 = (CheckBox)findViewById(R.id.checkboxEnableGfxH264);
checkboxPreferSendingUnicode = (CheckBox)findViewById(R.id.checkboxPreferSendingUnicode);
setConnectionTypeSpinnerAdapter(R.array.rdp_connection_type);
}

Expand Down Expand Up @@ -210,6 +212,7 @@ protected void updateViewFromSelected() {
checkboxVisualStyles.setChecked(selected.getVisualStyles());
checkboxEnableGfx.setChecked(selected.getEnableGfx());
checkboxEnableGfxH264.setChecked(selected.getEnableGfxH264());
checkboxPreferSendingUnicode.setChecked(selected.getPreferSendingUnicode());

/* TODO: Reinstate color spinner but for RDP settings.
colorSpinner = (Spinner)findViewById(R.id.colorformat);
Expand Down Expand Up @@ -272,9 +275,8 @@ protected void updateSelectedFromView() {
selected.setUseDpadAsArrows(checkboxUseDpadAsArrows.isChecked());
selected.setRotateDpad(checkboxRotateDpad.isChecked());
selected.setUseLastPositionToolbar(checkboxUseLastPositionToolbar.isChecked());
if (!checkboxUseLastPositionToolbar.isChecked()) {
selected.setUseLastPositionToolbarMoved(false);
}
selected.setUseLastPositionToolbarMoved(checkboxUseLastPositionToolbar.isChecked());
selected.setPreferSendingUnicode(checkboxPreferSendingUnicode.isChecked());
// TODO: Reinstate Color model spinner but for RDP settings.
//selected.setColorModel(((COLORMODEL)colorSpinner.getSelectedItem()).nameString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ public class RemoteRdpKeyboard extends RemoteKeyboard {
protected RdpKeyboardMapper keyboardMapper;
protected RemoteCanvas canvas;

public RemoteRdpKeyboard (RfbConnectable r, RemoteCanvas v, Handler h, boolean debugLog) {
public RemoteRdpKeyboard (RfbConnectable r, RemoteCanvas v, Handler h, boolean debugLog,
boolean preferSendingUnicode) {
super(r, v.getContext(), h, debugLog);
canvas = v;
keyboardMapper = new RdpKeyboardMapper(true);
keyboardMapper = new RdpKeyboardMapper(preferSendingUnicode);
keyboardMapper.init(context);
keyboardMapper.reset((RdpKeyboardMapper.KeyProcessingListener)r);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
package com.undatech.opaque;

import java.io.IOException;
import java.text.ParseException;
import java.util.Arrays;
import java.util.List;

import com.iiordanov.bVNC.Constants;
Expand All @@ -31,14 +29,11 @@

import android.app.Activity;
import android.content.Intent;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
Expand Down Expand Up @@ -110,8 +105,7 @@ public void onCreate(Bundle icicle) {

layoutUseLastPositionToolbar = (LinearLayout)findViewById(R.id.layoutUseLastPositionToolbar);
textUseLastPositionToolbar = (TextView) findViewById(R.id.textUseLastPositionToolbar);
String textStrUseLastPositionToolbar = getString(R.string.position_toolbar_last_used) + "\n" + getString(R.string.position_toolbar_last_used_summary);
textUseLastPositionToolbar.setText(textStrUseLastPositionToolbar);
textUseLastPositionToolbar.setText(getString(R.string.position_toolbar_last_used));
toggleUseLastPositionToolbar = (ToggleButton)findViewById(R.id.toggleUseLastPositionToolbar);
toggleUseLastPositionToolbar.setChecked(currentConnection.getUseLastPositionToolbar());

Expand Down
3 changes: 3 additions & 0 deletions bVNC/src/main/java/com/undatech/opaque/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,7 @@ public interface Connection {
void setUseLastPositionToolbarY(int useLastPositionToolbarY);
boolean getUseLastPositionToolbarMoved();
void setUseLastPositionToolbarMoved(boolean useLastPositionToolbarMoved);

boolean getPreferSendingUnicode();
void setPreferSendingUnicode(boolean preferSendingUnicode);
}
11 changes: 11 additions & 0 deletions bVNC/src/main/java/com/undatech/opaque/ConnectionSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,17 @@ public void setUseLastPositionToolbarMoved(boolean useLastPositionToolbarMoved)
this.useLastPositionToolbarMoved = useLastPositionToolbarMoved;
}

@Override
public boolean getPreferSendingUnicode() {
// Not used for Opaque
return false;
}

@Override
public void setPreferSendingUnicode(boolean preferSendingUnicode) {
// Not used for Opaque
}

@Override
public boolean getUseLastPositionToolbarMoved() {
return useLastPositionToolbarMoved;
Expand Down
8 changes: 8 additions & 0 deletions bVNC/src/main/res/layout-large/main_rdp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>

<CheckBox
android:id="@+id/checkboxPreferSendingUnicode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/prefer_sending_unicode"
android:textAppearance="?android:attr/textAppearanceMedium" />

<RadioGroup
android:id="@+id/groupRemoteSoundType"
android:layout_width="fill_parent"
Expand Down
Loading

0 comments on commit 11a9fe5

Please sign in to comment.