public static class DebugSettings implements Parcelable {
- private int debug;
+ private String debug;
private boolean asyncChannel;
private boolean asyncTransport;
private boolean asyncInput;
asyncTransport = parcel.readInt() == 1;
asyncInput = parcel.readInt() == 1;
asyncUpdate = parcel.readInt() == 1;
- debug = parcel.readInt();
+ debug = parcel.readString();
}
private void init() {
- debug = 0;
+ debug = "INFO";
asyncChannel = true;
asyncTransport = true;
asyncInput = true;
asyncUpdate = true;
}
- public int getDebugLevel() {
+ public String getDebugLevel() {
return debug;
}
- public void setDebugLevel(int debug) {
+ public void setDebugLevel(String debug) {
this.debug = debug;
}
out.writeInt(asyncTransport ? 1 : 0);
out.writeInt(asyncInput ? 1 : 0);
out.writeInt(asyncUpdate ? 1 : 0);
- out.writeInt(debug);
+ out.writeString(debug);
}
}
editor.putBoolean("bookmark.async_transport", debugSettings.getAsyncTransport());
editor.putBoolean("bookmark.async_input", debugSettings.getAsyncInput());
editor.putBoolean("bookmark.async_update", debugSettings.getAsyncUpdate());
- editor.putInt("bookmark.debug_level",
+ editor.putString("bookmark.debug_level",
debugSettings.getDebugLevel());
editor.commit();
debugSettings.setAsyncTransport(sharedPrefs.getBoolean("bookmark.async_transport", true));
debugSettings.setAsyncInput(sharedPrefs.getBoolean("bookmark.async_input", true));
debugSettings.setAsyncUpdate(sharedPrefs.getBoolean("bookmark.async_update", true));
- debugSettings.setDebugLevel(sharedPrefs.getInt("bookmark.debug_level", 0));
+ debugSettings.setDebugLevel(sharedPrefs.getString("bookmark.debug_level", "INFO"));
}
// Cloneable
private void debugSettingsChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals("bookmark.debug_level")) {
- int level = sharedPreferences.getInt(key, 0);
+ String level = sharedPreferences.getString(key, "INFO");
Preference pref = findPreference("bookmark.debug_level");
pref.setDefaultValue(level);
} else if (key.equals("bookmark.async_channel")) {
cursor.getInt(cursor.getColumnIndex("async_input")) == 1 ? true : false);
bookmark.getDebugSettings().setAsyncUpdate(
cursor.getInt(cursor.getColumnIndex("async_update")) == 1 ? true : false);
- bookmark.getDebugSettings().setDebugLevel(cursor.getInt(cursor.getColumnIndex("debug_level")));
+ bookmark.getDebugSettings().setDebugLevel(cursor.getString(cursor.getColumnIndex
+ ("debug_level")));
readBookmarkSpecificColumns(bookmark, cursor);
import android.database.sqlite.SQLiteOpenHelper;
public class BookmarkDB extends SQLiteOpenHelper {
- private static final int DB_VERSION = 7;
+ private static final int DB_VERSION = 8;
private static final String DB_NAME = "bookmarks.db";
public static final String ID = BaseColumns._ID;
+ "3389, "
+ "1, 1, 2, 2, 0, 0, 0, 0, "
+ "'', '', "
- + "1, 1, 1, 1, 0, 0);";
+ + "1, 1, 1, 1, 0, 'INFO');";
db.execSQL(sqlInsertDefaultSessionEntry);
}
+ "async_input INTEGER DEFAULT 0, "
+ "async_update INTEGER DEFAULT 0, "
+ "console_mode INTEGER, "
- + "debug_level INTEGER DEFAULT 0, "
+ + "debug_level TEXT DEFAULT 'INFO', "
+ "FOREIGN KEY(screen_settings) REFERENCES tbl_screen_settings(" + ID + "), "
+ "FOREIGN KEY(performance_flags) REFERENCES tbl_performance_flags(" + ID + "), "
args.add(addFlag("themes", flags.getTheming()));
args.add(addFlag("fonts", flags.getFontSmoothing()));
args.add(addFlag("aero", flags.getDesktopComposition()));
+ args.add(addFlag("glyph-cache", false));
if (!advanced.getRemoteProgram().isEmpty()) {
args.add("/app:" + advanced.getRemoteProgram());
args.add("/microphone");
}
- args.add("/log-level:TRACE");
+ args.add("/log-level:"+debug.getDebugLevel());
String[] arrayArgs = args.toArray(new String[args.size()]);
return freerdp_parse_arguments(inst, arrayArgs);
}
<string name="settings_cat_screen">Screen Settings</string>
<string name="settings_colors">Colors</string>
<string-array name="colors_array">
+ <item>Palette (8 Bit)</item>
+ <item>High Color (15 Bit)</item>
<item>High Color (16 Bit)</item>
<item>True Color (24 Bit)</item>
<item>Highest Quality (32 Bit)</item>
do not translate! -->
<string-array name="colors_values_array"
translatable="false">
+ <item>8</item>
+ <item>15</item>
<item>16</item>
<item>24</item>
<item>32</item>
<string name="dlg_msg_clear_cert_cache">Are you sure you want to delete all your cached Certificates?</string>
<string name="debug_level">Debug Level</string>
<string name="settings_debug">Debug Settings</string>
+ <string-array name="debug_array">
+ <item>OFF</item>
+ <item>FATAL</item>
+ <item>ERROR</item>
+ <item>WARN</item>
+ <item>INFO</item>
+ <item>DEBUG</item>
+ <item>TRACE</item>
+ </string-array>
+ <!-- This array is used as is in code,
+ do not translate! -->
+ <string-array name="debug_values_array"
+ translatable="false">
+ <item>OFF</item>
+ <item>FATAL</item>
+ <item>ERROR</item>
+ <item>WARN</item>
+ <item>INFO</item>
+ <item>DEBUG</item>
+ <item>TRACE</item>
+ </string-array>
</resources>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:freerdp="http://schemas.android.com/apk/res-auto">
<PreferenceCategory android:title="@string/settings_debug">
- <com.freerdp.freerdpcore.utils.IntEditTextPreference
- android:key="bookmark.debug_level"
- android:title="@string/debug_level"
- android:summary="Debug level, 0 to disable."
- android:numeric="integer"
- android:inputType="number"
- freerdp:bounds_min="0"
- freerdp:bounds_max="10"
- freerdp:bounds_default="0" />
- <CheckBoxPreference android:key="bookmark.async_channel"
- android:title="@string/settings_async_channel"/>
- <CheckBoxPreference android:key="bookmark.async_transport"
- android:title="@string/settings_async_transport"/>
- <CheckBoxPreference android:key="bookmark.async_update"
- android:title="@string/settings_async_update"/>
- <CheckBoxPreference android:key="bookmark.async_input"
- android:title="@string/settings_async_input"/>
+ <ListPreference
+ android:key="bookmark.debug_level"
+ android:title="@string/debug_level"
+ android:entries="@array/debug_array"
+ android:entryValues="@array/debug_values_array"/>
+ <CheckBoxPreference android:key="bookmark.async_channel"
+ android:title="@string/settings_async_channel"/>
+ <CheckBoxPreference android:key="bookmark.async_transport"
+ android:title="@string/settings_async_transport"/>
+ <CheckBoxPreference android:key="bookmark.async_update"
+ android:title="@string/settings_async_update"/>
+ <CheckBoxPreference android:key="bookmark.async_input"
+ android:title="@string/settings_async_input"/>
</PreferenceCategory>
</PreferenceScreen>