FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity Class Reference
Inheritance diagram for com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity:
Collaboration diagram for com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity:

Data Structures

class  ClientPreferenceFragment
 
class  PowerPreferenceFragment
 
class  SecurityPreferenceFragment
 
class  UiPreferenceFragment
 

Public Member Functions

boolean onIsMultiPane ()
 
void onBuildHeaders (List< Header > target)
 

Static Public Member Functions

static SharedPreferences get (Context context)
 
static int getDisconnectTimeout (Context context)
 
static boolean getHideStatusBar (Context context)
 
static boolean getHideActionBar (Context context)
 
static boolean getUseBackAsAltf4 (Context context)
 
static boolean getAcceptAllCertificates (Context context)
 
static boolean getHideZoomControls (Context context)
 
static boolean getSwapMouseButtons (Context context)
 
static boolean getInvertScrolling (Context context)
 
static boolean getAskOnExit (Context context)
 
static boolean getAutoScrollTouchPointer (Context context)
 
static String getClientName (Context context)
 

Protected Member Functions

void onCreate (Bundle savedInstanceState)
 
boolean isValidFragment (String fragmentName)
 

Detailed Description

Definition at line 35 of file ApplicationSettingsActivity.java.

Member Function Documentation

◆ get()

static SharedPreferences com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.get ( Context  context)
inlinestatic

Definition at line 210 of file ApplicationSettingsActivity.java.

211 {
212 Context appContext = context.getApplicationContext();
213 PreferenceManager.setDefaultValues(appContext, R.xml.settings_app_client, false);
214 PreferenceManager.setDefaultValues(appContext, R.xml.settings_app_power, false);
215 PreferenceManager.setDefaultValues(appContext, R.xml.settings_app_security, false);
216 PreferenceManager.setDefaultValues(appContext, R.xml.settings_app_ui, false);
217 SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(appContext);
218
219 final String key = context.getString(R.string.preference_key_client_name);
220 final String value = preferences.getString(key, "");
221 if (value.isEmpty())
222 {
223 final String android_id = UUID.randomUUID().toString();
224 final String defaultValue = context.getString(R.string.preference_default_client_name);
225 final String name = defaultValue + "-" + android_id;
226 preferences.edit().putString(key, name.substring(0, 31)).apply();
227 }
228
229 return preferences;
230 }
Definition wtypes.h:252

◆ getAcceptAllCertificates()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getAcceptAllCertificates ( Context  context)
inlinestatic

Definition at line 260 of file ApplicationSettingsActivity.java.

261 {
262 SharedPreferences preferences = get(context);
263 return preferences.getBoolean(
264 context.getString(R.string.preference_key_accept_certificates), false);
265 }

◆ getAskOnExit()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getAskOnExit ( Context  context)
inlinestatic

Definition at line 288 of file ApplicationSettingsActivity.java.

289 {
290 SharedPreferences preferences = get(context);
291 return preferences.getBoolean(context.getString(R.string.preference_key_ui_ask_on_exit),
292 false);
293 }

◆ getAutoScrollTouchPointer()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getAutoScrollTouchPointer ( Context  context)
inlinestatic

Definition at line 295 of file ApplicationSettingsActivity.java.

296 {
297 SharedPreferences preferences = get(context);
298 return preferences.getBoolean(
299 context.getString(R.string.preference_key_ui_auto_scroll_touchpointer), false);
300 }

◆ getClientName()

static String com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getClientName ( Context  context)
inlinestatic

Definition at line 302 of file ApplicationSettingsActivity.java.

303 {
304 SharedPreferences preferences = get(context);
305 return preferences.getString(context.getString(R.string.preference_key_client_name), "");
306 }

◆ getDisconnectTimeout()

static int com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getDisconnectTimeout ( Context  context)
inlinestatic

Definition at line 232 of file ApplicationSettingsActivity.java.

233 {
234 SharedPreferences preferences = get(context);
235 return preferences.getInt(
236 context.getString(R.string.preference_key_power_disconnect_timeout), 0);
237 }

◆ getHideActionBar()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getHideActionBar ( Context  context)
inlinestatic

Definition at line 246 of file ApplicationSettingsActivity.java.

247 {
248 SharedPreferences preferences = get(context);
249 return preferences.getBoolean(context.getString(R.string.preference_key_ui_hide_action_bar),
250 false);
251 }

◆ getHideStatusBar()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getHideStatusBar ( Context  context)
inlinestatic

Definition at line 239 of file ApplicationSettingsActivity.java.

240 {
241 SharedPreferences preferences = get(context);
242 return preferences.getBoolean(context.getString(R.string.preference_key_ui_hide_status_bar),
243 false);
244 }

◆ getHideZoomControls()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getHideZoomControls ( Context  context)
inlinestatic

Definition at line 267 of file ApplicationSettingsActivity.java.

268 {
269 SharedPreferences preferences = get(context);
270 return preferences.getBoolean(
271 context.getString(R.string.preference_key_ui_hide_zoom_controls), false);
272 }

◆ getInvertScrolling()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getInvertScrolling ( Context  context)
inlinestatic

Definition at line 281 of file ApplicationSettingsActivity.java.

282 {
283 SharedPreferences preferences = get(context);
284 return preferences.getBoolean(
285 context.getString(R.string.preference_key_ui_invert_scrolling), false);
286 }

◆ getSwapMouseButtons()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getSwapMouseButtons ( Context  context)
inlinestatic

Definition at line 274 of file ApplicationSettingsActivity.java.

275 {
276 SharedPreferences preferences = get(context);
277 return preferences.getBoolean(
278 context.getString(R.string.preference_key_ui_swap_mouse_buttons), false);
279 }

◆ getUseBackAsAltf4()

static boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.getUseBackAsAltf4 ( Context  context)
inlinestatic

Definition at line 253 of file ApplicationSettingsActivity.java.

254 {
255 SharedPreferences preferences = get(context);
256 return preferences.getBoolean(
257 context.getString(R.string.preference_key_ui_use_back_as_altf4), true);
258 }

◆ isValidFragment()

boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.isValidFragment ( String  fragmentName)
inlineprotected

Definition at line 70 of file ApplicationSettingsActivity.java.

71 {
72 return PreferenceFragment.class.getName().equals(fragmentName) ||
73 ClientPreferenceFragment.class.getName().equals(fragmentName) ||
74 UiPreferenceFragment.class.getName().equals(fragmentName) ||
75 PowerPreferenceFragment.class.getName().equals(fragmentName) ||
76 SecurityPreferenceFragment.class.getName().equals(fragmentName);
77 }

◆ onBuildHeaders()

void com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.onBuildHeaders ( List< Header >  target)
inline

Definition at line 65 of file ApplicationSettingsActivity.java.

66 {
67 loadHeadersFromResource(R.xml.settings_app_headers, target);
68 }

◆ onCreate()

void com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.onCreate ( Bundle  savedInstanceState)
inlineprotected

Definition at line 43 of file ApplicationSettingsActivity.java.

44 {
45 super.onCreate(savedInstanceState);
46 setupActionBar();
47 }

◆ onIsMultiPane()

boolean com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity.onIsMultiPane ( )
inline

Definition at line 58 of file ApplicationSettingsActivity.java.

59 {
60 return isXLargeTablet(this);
61 }

The documentation for this class was generated from the following file: