Fixed settings load/store.
This commit is contained in:
parent
cabcf7c479
commit
382626f10f
@ -748,6 +748,10 @@ public class BookmarkBase implements Parcelable, Cloneable {
|
|||||||
|
|
||||||
editor.putBoolean("bookmark.perf_remotefx",
|
editor.putBoolean("bookmark.perf_remotefx",
|
||||||
performanceFlags.getRemoteFX());
|
performanceFlags.getRemoteFX());
|
||||||
|
editor.putBoolean("bookmark.perf_gfx",
|
||||||
|
performanceFlags.getGfx());
|
||||||
|
editor.putBoolean("bookmark.perf_gfx_h264",
|
||||||
|
performanceFlags.getH264());
|
||||||
editor.putBoolean("bookmark.perf_wallpaper",
|
editor.putBoolean("bookmark.perf_wallpaper",
|
||||||
performanceFlags.getWallpaper());
|
performanceFlags.getWallpaper());
|
||||||
editor.putBoolean("bookmark.perf_font_smoothing",
|
editor.putBoolean("bookmark.perf_font_smoothing",
|
||||||
@ -774,6 +778,10 @@ public class BookmarkBase implements Parcelable, Cloneable {
|
|||||||
|
|
||||||
editor.putBoolean("bookmark.perf_remotefx_3g", advancedSettings
|
editor.putBoolean("bookmark.perf_remotefx_3g", advancedSettings
|
||||||
.getPerformance3G().getRemoteFX());
|
.getPerformance3G().getRemoteFX());
|
||||||
|
editor.putBoolean("bookmark.perf_gfx_3g", advancedSettings
|
||||||
|
.getPerformance3G().getGfx());
|
||||||
|
editor.putBoolean("bookmark.perf_gfx_h264_3g", advancedSettings
|
||||||
|
.getPerformance3G().getH264());
|
||||||
editor.putBoolean("bookmark.perf_wallpaper_3g", advancedSettings
|
editor.putBoolean("bookmark.perf_wallpaper_3g", advancedSettings
|
||||||
.getPerformance3G().getWallpaper());
|
.getPerformance3G().getWallpaper());
|
||||||
editor.putBoolean("bookmark.perf_font_smoothing_3g", advancedSettings
|
editor.putBoolean("bookmark.perf_font_smoothing_3g", advancedSettings
|
||||||
@ -825,6 +833,10 @@ public class BookmarkBase implements Parcelable, Cloneable {
|
|||||||
|
|
||||||
performanceFlags.setRemoteFX(sharedPrefs.getBoolean(
|
performanceFlags.setRemoteFX(sharedPrefs.getBoolean(
|
||||||
"bookmark.perf_remotefx", false));
|
"bookmark.perf_remotefx", false));
|
||||||
|
performanceFlags.setGfx(sharedPrefs.getBoolean(
|
||||||
|
"bookmark.perf_gfx", false));
|
||||||
|
performanceFlags.setH264(sharedPrefs.getBoolean(
|
||||||
|
"bookmark.perf_gfx_h264", false));
|
||||||
performanceFlags.setWallpaper(sharedPrefs.getBoolean(
|
performanceFlags.setWallpaper(sharedPrefs.getBoolean(
|
||||||
"bookmark.perf_wallpaper", false));
|
"bookmark.perf_wallpaper", false));
|
||||||
performanceFlags.setFontSmoothing(sharedPrefs.getBoolean(
|
performanceFlags.setFontSmoothing(sharedPrefs.getBoolean(
|
||||||
@ -850,6 +862,10 @@ public class BookmarkBase implements Parcelable, Cloneable {
|
|||||||
|
|
||||||
advancedSettings.getPerformance3G().setRemoteFX(
|
advancedSettings.getPerformance3G().setRemoteFX(
|
||||||
sharedPrefs.getBoolean("bookmark.perf_remotefx_3g", false));
|
sharedPrefs.getBoolean("bookmark.perf_remotefx_3g", false));
|
||||||
|
advancedSettings.getPerformance3G().setGfx(sharedPrefs.getBoolean(
|
||||||
|
"bookmark.perf_gfx_3g", false));
|
||||||
|
advancedSettings.getPerformance3G().setH264(sharedPrefs.getBoolean(
|
||||||
|
"bookmark.perf_gfx_h264_3g", false));
|
||||||
advancedSettings.getPerformance3G().setWallpaper(
|
advancedSettings.getPerformance3G().setWallpaper(
|
||||||
sharedPrefs.getBoolean("bookmark.perf_wallpaper_3g", false));
|
sharedPrefs.getBoolean("bookmark.perf_wallpaper_3g", false));
|
||||||
advancedSettings.getPerformance3G().setFontSmoothing(
|
advancedSettings.getPerformance3G().setFontSmoothing(
|
||||||
|
@ -261,6 +261,8 @@ public abstract class BookmarkBaseGateway
|
|||||||
|
|
||||||
private void addPerformanceFlagsColumns(ArrayList<String> columns) {
|
private void addPerformanceFlagsColumns(ArrayList<String> columns) {
|
||||||
columns.add("join_performance_flags.perf_remotefx as performanceRemoteFX");
|
columns.add("join_performance_flags.perf_remotefx as performanceRemoteFX");
|
||||||
|
columns.add("join_performance_flags.perf_gfx as performanceGfx");
|
||||||
|
columns.add("join_performance_flags.perf_gfx_h264 as performanceGfxH264");
|
||||||
columns.add("join_performance_flags.perf_wallpaper as performanceWallpaper");
|
columns.add("join_performance_flags.perf_wallpaper as performanceWallpaper");
|
||||||
columns.add("join_performance_flags.perf_theming as performanceTheming");
|
columns.add("join_performance_flags.perf_theming as performanceTheming");
|
||||||
columns.add("join_performance_flags.perf_full_window_drag as performanceFullWindowDrag");
|
columns.add("join_performance_flags.perf_full_window_drag as performanceFullWindowDrag");
|
||||||
@ -278,6 +280,8 @@ public abstract class BookmarkBaseGateway
|
|||||||
|
|
||||||
private void addPerformanceFlags3GColumns(ArrayList<String> columns) {
|
private void addPerformanceFlags3GColumns(ArrayList<String> columns) {
|
||||||
columns.add("join_performance_3G.perf_remotefx as performanceRemoteFX3G");
|
columns.add("join_performance_3G.perf_remotefx as performanceRemoteFX3G");
|
||||||
|
columns.add("join_performance_3G.perf_gfx as performanceGfx3G");
|
||||||
|
columns.add("join_performance_3G.perf_gfx_h264 as performanceGfxH2643G");
|
||||||
columns.add("join_performance_3G.perf_wallpaper as performanceWallpaper3G");
|
columns.add("join_performance_3G.perf_wallpaper as performanceWallpaper3G");
|
||||||
columns.add("join_performance_3G.perf_theming as performanceTheming3G");
|
columns.add("join_performance_3G.perf_theming as performanceTheming3G");
|
||||||
columns.add("join_performance_3G.perf_full_window_drag as performanceFullWindowDrag3G");
|
columns.add("join_performance_3G.perf_full_window_drag as performanceFullWindowDrag3G");
|
||||||
@ -335,6 +339,11 @@ public abstract class BookmarkBaseGateway
|
|||||||
private void readPerformanceFlags(BookmarkBase bookmark, Cursor cursor) {
|
private void readPerformanceFlags(BookmarkBase bookmark, Cursor cursor) {
|
||||||
BookmarkBase.PerformanceFlags perfFlags = bookmark.getPerformanceFlags();
|
BookmarkBase.PerformanceFlags perfFlags = bookmark.getPerformanceFlags();
|
||||||
perfFlags.setRemoteFX(cursor.getInt(cursor.getColumnIndex("performanceRemoteFX")) == 0 ? false : true);
|
perfFlags.setRemoteFX(cursor.getInt(cursor.getColumnIndex("performanceRemoteFX")) == 0 ? false : true);
|
||||||
|
perfFlags.setGfx(cursor.getInt(cursor.getColumnIndex("performanceGfx")) == 0 ? false :
|
||||||
|
true);
|
||||||
|
perfFlags.setH264(cursor.getInt(cursor.getColumnIndex("performanceGfxH264")) == 0 ?
|
||||||
|
false :
|
||||||
|
true);
|
||||||
perfFlags.setWallpaper(cursor.getInt(cursor.getColumnIndex("performanceWallpaper")) == 0 ? false : true);
|
perfFlags.setWallpaper(cursor.getInt(cursor.getColumnIndex("performanceWallpaper")) == 0 ? false : true);
|
||||||
perfFlags.setTheming(cursor.getInt(cursor.getColumnIndex("performanceTheming")) == 0 ? false : true);
|
perfFlags.setTheming(cursor.getInt(cursor.getColumnIndex("performanceTheming")) == 0 ? false : true);
|
||||||
perfFlags.setFullWindowDrag(cursor.getInt(cursor.getColumnIndex("performanceFullWindowDrag")) == 0 ? false : true);
|
perfFlags.setFullWindowDrag(cursor.getInt(cursor.getColumnIndex("performanceFullWindowDrag")) == 0 ? false : true);
|
||||||
@ -354,6 +363,11 @@ public abstract class BookmarkBaseGateway
|
|||||||
private void readPerformanceFlags3G(BookmarkBase bookmark, Cursor cursor) {
|
private void readPerformanceFlags3G(BookmarkBase bookmark, Cursor cursor) {
|
||||||
BookmarkBase.PerformanceFlags perfFlags = bookmark.getAdvancedSettings().getPerformance3G();
|
BookmarkBase.PerformanceFlags perfFlags = bookmark.getAdvancedSettings().getPerformance3G();
|
||||||
perfFlags.setRemoteFX(cursor.getInt(cursor.getColumnIndex("performanceRemoteFX3G")) == 0 ? false : true);
|
perfFlags.setRemoteFX(cursor.getInt(cursor.getColumnIndex("performanceRemoteFX3G")) == 0 ? false : true);
|
||||||
|
perfFlags.setGfx(cursor.getInt(cursor.getColumnIndex("performanceGfx3G")) == 0 ? false :
|
||||||
|
true);
|
||||||
|
perfFlags.setH264(cursor.getInt(cursor.getColumnIndex("performanceGfxH2643G")) == 0 ?
|
||||||
|
false :
|
||||||
|
true);
|
||||||
perfFlags.setWallpaper(cursor.getInt(cursor.getColumnIndex("performanceWallpaper3G")) == 0 ? false : true);
|
perfFlags.setWallpaper(cursor.getInt(cursor.getColumnIndex("performanceWallpaper3G")) == 0 ? false : true);
|
||||||
perfFlags.setTheming(cursor.getInt(cursor.getColumnIndex("performanceTheming3G")) == 0 ? false : true);
|
perfFlags.setTheming(cursor.getInt(cursor.getColumnIndex("performanceTheming3G")) == 0 ? false : true);
|
||||||
perfFlags.setFullWindowDrag(cursor.getInt(cursor.getColumnIndex("performanceFullWindowDrag3G")) == 0 ? false : true);
|
perfFlags.setFullWindowDrag(cursor.getInt(cursor.getColumnIndex("performanceFullWindowDrag3G")) == 0 ? false : true);
|
||||||
@ -373,6 +387,8 @@ public abstract class BookmarkBaseGateway
|
|||||||
private void fillPerformanceFlagsContentValues(BookmarkBase.PerformanceFlags perfFlags, ContentValues values)
|
private void fillPerformanceFlagsContentValues(BookmarkBase.PerformanceFlags perfFlags, ContentValues values)
|
||||||
{
|
{
|
||||||
values.put("perf_remotefx", perfFlags.getRemoteFX());
|
values.put("perf_remotefx", perfFlags.getRemoteFX());
|
||||||
|
values.put("perf_gfx", perfFlags.getGfx());
|
||||||
|
values.put("perf_gfx_h264", perfFlags.getH264());
|
||||||
values.put("perf_wallpaper", perfFlags.getWallpaper());
|
values.put("perf_wallpaper", perfFlags.getWallpaper());
|
||||||
values.put("perf_theming", perfFlags.getTheming());
|
values.put("perf_theming", perfFlags.getTheming());
|
||||||
values.put("perf_full_window_drag", perfFlags.getFullWindowDrag());
|
values.put("perf_full_window_drag", perfFlags.getFullWindowDrag());
|
||||||
|
@ -46,8 +46,8 @@ public class BookmarkDB extends SQLiteOpenHelper {
|
|||||||
"CREATE TABLE tbl_performance_flags ("
|
"CREATE TABLE tbl_performance_flags ("
|
||||||
+ ID + " INTEGER PRIMARY KEY, "
|
+ ID + " INTEGER PRIMARY KEY, "
|
||||||
+ "perf_remotefx INTEGER, "
|
+ "perf_remotefx INTEGER, "
|
||||||
+ "perf_gfx INTEGER,"
|
+ "perf_gfx INTEGER, "
|
||||||
+ "perf_gfx_h264 INTEGER,"
|
+ "perf_gfx_h264 INTEGER, "
|
||||||
+ "perf_wallpaper INTEGER, "
|
+ "perf_wallpaper INTEGER, "
|
||||||
+ "perf_theming INTEGER, "
|
+ "perf_theming INTEGER, "
|
||||||
+ "perf_full_window_drag INTEGER, "
|
+ "perf_full_window_drag INTEGER, "
|
||||||
@ -71,7 +71,6 @@ public class BookmarkDB extends SQLiteOpenHelper {
|
|||||||
+ "VALUES ( "
|
+ "VALUES ( "
|
||||||
+ "32, 1, 1024, 768);";
|
+ "32, 1, 1024, 768);";
|
||||||
db.execSQL(sqlInsertDefaultScreenEntry);
|
db.execSQL(sqlInsertDefaultScreenEntry);
|
||||||
db.execSQL(sqlInsertDefaultScreenEntry);
|
|
||||||
|
|
||||||
String sqlInsertDefaultPerfFlags =
|
String sqlInsertDefaultPerfFlags =
|
||||||
"INSERT INTO tbl_performance_flags ("
|
"INSERT INTO tbl_performance_flags ("
|
||||||
@ -87,7 +86,6 @@ public class BookmarkDB extends SQLiteOpenHelper {
|
|||||||
+ "VALUES ( "
|
+ "VALUES ( "
|
||||||
+ "1, 1, 1, 0, 0, 0, 0, 0, 0);";
|
+ "1, 1, 1, 0, 0, 0, 0, 0, 0);";
|
||||||
db.execSQL(sqlInsertDefaultPerfFlags);
|
db.execSQL(sqlInsertDefaultPerfFlags);
|
||||||
db.execSQL(sqlInsertDefaultPerfFlags);
|
|
||||||
|
|
||||||
String sqlInsertDefaultSessionEntry =
|
String sqlInsertDefaultSessionEntry =
|
||||||
"INSERT INTO tbl_manual_bookmarks ("
|
"INSERT INTO tbl_manual_bookmarks ("
|
||||||
|
@ -207,7 +207,9 @@ public class LibFreeRDP {
|
|||||||
args.add("/gfx");
|
args.add("/gfx");
|
||||||
}
|
}
|
||||||
|
|
||||||
args.add(addFlag("gfx-h264", flags.getH264()));
|
if (flags.getH264()) {
|
||||||
|
args.add("/gfx-h264");
|
||||||
|
}
|
||||||
|
|
||||||
args.add(addFlag("wallpaper", flags.getWallpaper()));
|
args.add(addFlag("wallpaper", flags.getWallpaper()));
|
||||||
args.add(addFlag("window-drag", flags.getFullWindowDrag()));
|
args.add(addFlag("window-drag", flags.getFullWindowDrag()));
|
||||||
|
Loading…
Reference in New Issue
Block a user