[Samsung Galaxy S (4G Model)] FBis251:
Just using some non-existent classes and a variable that got initialzed twice.

From 66ffed00c6b7a48a17606f1cef9747ef04f075e5 Mon Sep 17 00:00:00 2001
From: Fernando Barillas <fbis251@gmail.com>
Date: Wed, 15 May 2013 00:19:47 -0700
Subject: [PATCH] Fix SGS4GSettings

Change-Id: Ifa578e2104f176bec8d66b164f10a9a6165e7143
Signed-off-by: Fernando Barillas <fbis251@gmail.com>
---
.../settings/device/DeviceSettings.java | 26 ++++++++++----------
.../cyanogenmod/settings/device/TvOutService.java | 8 +++---
2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/SGS4GParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/SGS4GParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
index 4a2e46f..0d022a2 100644
--- a/SGS4GParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ b/SGS4GParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -20,7 +20,7 @@ public class DeviceSettings extends PreferenceActivity {
public static final String KEY_HSPA = "hspa";
public static final String KEY_HSPA_CATEGORY = "category_radio";
public static final String KEY_TVOUT_ENABLE = "tvout_enable";
- public static final String KEY_TVOUT_ENABLE = "tvout_system";
+ public static final String KEY_TVOUT_SYSTEM = "tvout_system";
private ColorTuningPreference mColorTuning;
private ListPreference mMdnie;
private ListPreference mBacklightTimeout;
@@ -37,7 +37,7 @@ public class DeviceSettings extends PreferenceActivity {
updateTvOutEnable(state != 0);
}

- };
+ };

[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {
@@ -57,14 +57,14 @@ public class DeviceSettings extends PreferenceActivity {

mHspa = (ListPreference) findPreference(KEY_HSPA);
if (Hspa.isSupported()) {
- mHspa.setOnPreferenceChangeListener(new Hspa(this));
+ mHspa.setOnPreferenceChangeListener(new Hspa(this));
} else {
- PreferenceCategory category = (PreferenceCategory) getPreferenceScreen().findPreference(KEY_HSPA_CATEGORY);
- category.removePreference(mHspa);
- getPreferenceScreen().removePreference(category);
+ PreferenceCategory category = (PreferenceCategory) getPreferenceScreen().findPreference(KEY_HSPA_CATEGORY);
+ category.removePreference(mHspa);
+ getPreferenceScreen().removePreference(category);
}
-
- mTvOut = new TvOut();
+
+ mTvOut = new TvOut();
mTvOutEnable = (CheckBoxPreference) findPreference(KEY_TVOUT_ENABLE);
mTvOutEnable.setChecked(mTvOut._isEnabled());

@@ -73,7 +73,7 @@ public class DeviceSettings extends PreferenceActivity {
[MENTION=439709]override[/MENTION]
public boolean onPreferenceChange(Preference preference, Object newValue) {
boolean enable = (Boolean) newValue;
- Intent i = new Intent(AriesParts.this, TvOutService.class);
+ Intent i = new Intent(DeviceSettings.this, TvOutService.class);
i.putExtra(TvOutService.EXTRA_COMMAND, enable ? TvOutService.COMMAND_ENABLE : TvOutService.COMMAND_DISABLE);
startService(i);
return true;
@@ -88,7 +88,7 @@ public class DeviceSettings extends PreferenceActivity {
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (mTvOut._isEnabled()) {
int newSystem = Integer.valueOf((String) newValue);
- Intent i = new Intent(AriesParts.this, TvOutService.class);
+ Intent i = new Intent(DeviceSettings.this, TvOutService.class);
i.putExtra(TvOutService.EXTRA_COMMAND, TvOutService.COMMAND_CHANGE_SYSTEM);
i.putExtra(TvOutService.EXTRA_SYSTEM, newSystem);
startService(i);
@@ -124,7 +124,7 @@ public class DeviceSettings extends PreferenceActivity {
[MENTION=439709]override[/MENTION]
protected void onDestroy() {
mTvOut.finalize();
- super.onDestroy();
- }
-}
+ super.onDestroy();
+ }
}
+
diff --git a/SGS4GParts/src/com/cyanogenmod/settings/device/TvOutService.java b/SGS4GParts/src/com/cyanogenmod/settings/device/TvOutService.java
index 5812ac6..bb2797e 100644
--- a/SGS4GParts/src/com/cyanogenmod/settings/device/TvOutService.java
+++ b/SGS4GParts/src/com/cyanogenmod/settings/device/TvOutService.java
@@ -1,4 +1,4 @@
-package com.cyanogenmod.AriesParts;
+package com.cyanogenmod.settings.device;

import android.app.Service;
import android.content.BroadcastReceiver;
@@ -46,14 +46,14 @@ public class TvOutService extends Service {
}
else if (Intent.ACTION_SCREEN_ON.equals(action)) {
if (mWasOn) {
- enable();
+ SystemProperties.set("ctl.start", "tvouthack");
mWasOn = false;
}
}
else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
if (mTvOut._isEnabled()) {
mWasOn = true;
- disable();
+ SystemProperties.set("ctl.stop", "tvouthack");
}
}
}
@@ -92,7 +92,7 @@ public class TvOutService extends Service {
if (intent != null) {
String command = intent.getStringExtra("command");
if (COMMAND_ENABLE.equals(command)) {
- mSystem = Integer.parseInt(mPref.getString(AriesParts.KEY_TVOUT_SYSTEM, "2")); // Default = PAL
+ mSystem = Integer.parseInt(mPref.getString(DeviceSettings.KEY_TVOUT_SYSTEM, "2")); // Default = PAL
enable();
}
else if (COMMAND_DISABLE.equals(command)) {
--
1.7.9.5

EDIT

here it is with syntax highlighting

http://pastebin.com/GcsJgZie

EDIT 2

IRC anyone?