Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<string name="custom_carrier_label_title">Custom carrier label</string>
<string name="longpress_to_kill_title">Hold back to kill</string>
<string name="longpress_to_kill_summary">Holding back will kill the current activity</string>

<string name="horizontal_recents_title">Use WebAOKP</string>
<string name="horizontal_recents_summary">Horizontal style recent tasks panel. Must Reboot following change.</string>

<!-- CRT animations -->
<string name="crt_animations_header">CRT animations</string>
Expand Down
7 changes: 6 additions & 1 deletion res/xml/prefs_ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
android:key="longpress_to_kill"
android:title="@string/longpress_to_kill_title"
android:summary="@string/longpress_to_kill_summary" />


<CheckBoxPreference
android:key="horizontal_recents"
android:title="@string/horizontal_recents_title"
android:summary="@string/horizontal_recents_summary" />

<ListPreference
android:entries="@array/rotation_animation_delay_entries"
android:entryValues="@array/rotation_animation_delay_values"
Expand Down
4 changes: 2 additions & 2 deletions src/com/roman/romcontrol/activities/StatusBarToggles.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public class StatusBarTogglePreference extends PreferenceFragment implements
ListPreference mToggleStyle;

private final String[] availableGsmToggles = {
"ROTATE", "BT", "GPS", "DATA", "WIFI", "2G", "AP", "AIRPLANE_MODE", "VIBRATE", "SILENT"
"ROTATE", "BT", "GPS", "DATA", "WIFI", "2G", "AP", "AIRPLANE_MODE", "VIBRATE", "SILENT", "TORCH"
};

private final String[] availableCdmaToggles = {
"ROTATE", "BT", "GPS", "LTE", "DATA", "WIFI", "AP", "AIRPLANE_MODE", "VIBRATE", "SILENT"
"ROTATE", "BT", "GPS", "LTE", "DATA", "WIFI", "AP", "AIRPLANE_MODE", "VIBRATE", "SILENT", "TORCH"
};

@Override
Expand Down
15 changes: 14 additions & 1 deletion src/com/roman/romcontrol/activities/UserInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ public class UserInterfacePreferences extends PreferenceFragment implements
private static final String PREF_CUSTOM_CARRIER_LABEL = "custom_carrier_label";
private static final String PREF_LONGPRESS_TO_KILL = "longpress_to_kill";
private static final String PREF_ROTATION_ANIMATION = "rotation_animation_delay";
private static final String PREF_HORIZONTAL_RECENTS = "horizontal_recents";

CheckBoxPreference mCrtOnAnimation;
CheckBoxPreference mCrtOffAnimation;
CheckBoxPreference mShowImeSwitcher;
CheckBoxPreference mLongPressToKill;
CheckBoxPreference mHorizontalRecents;
Preference mCustomLabel;
ListPreference mAnimationRotationDelay;

Expand Down Expand Up @@ -86,6 +88,10 @@ public void onCreate(Bundle savedInstanceState) {
mLongPressToKill.setChecked(Settings.Secure.getInt(getActivity().getContentResolver(),
Settings.Secure.KILL_APP_LONGPRESS_BACK, 0) == 1);

mHorizontalRecents = (CheckBoxPreference) findPreference(PREF_HORIZONTAL_RECENTS);
mHorizontalRecents.setChecked(Settings.System.getInt(getActivity().getContentResolver(),
Settings.System.HORIZONTAL_RECENTS_TASK_PANEL, 0) == 1);

mAnimationRotationDelay = (ListPreference) findPreference(PREF_ROTATION_ANIMATION);
mAnimationRotationDelay.setOnPreferenceChangeListener(this);
mAnimationRotationDelay.setValue(Settings.System.getInt(getActivity()
Expand Down Expand Up @@ -165,8 +171,15 @@ public void onClick(DialogInterface dialog, int whichButton) {
Settings.Secure.KILL_APP_LONGPRESS_BACK, checked ? 1 : 0);
return true;

}
} else if (preference == mHorizontalRecents) {

boolean checked = ((CheckBoxPreference) preference).isChecked();
Settings.System.putInt(getActivity().getContentResolver(),
Settings.System.HORIZONTAL_RECENTS_TASK_PANEL, checked ? 1 : 0);
Log.d("WebAOKP", "Setting WebAOKP to");
Log.d("WebAOKP", checked ? "True" : "False");
return true;
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
}

Expand Down