package com.pilot51.voicenotify;

import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

public class MainActivity extends PreferenceActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preferences);

		((Preference) findPreference("accessibility")).setOnPreferenceClickListener(new OnPreferenceClickListener() {
			public boolean onPreferenceClick(Preference preference) {
				startActivity(new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS));
				return true;
			}
		});
		
		((Preference) findPreference("appList")).setOnPreferenceClickListener(new OnPreferenceClickListener() {
			public boolean onPreferenceClick(Preference preference) {
				startActivity(new Intent(MainActivity.this, AppList.class));
				return true;
			}
		});
	}
}

package com.pilot51.voicenotify;

import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;

public class MainActivity extends PreferenceActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preferences);

		Preference accessPref = (Preference)findPreference("accessibility");
		int sdkVer = android.os.Build.VERSION.SDK_INT;
		if (sdkVer > 4) {
			accessPref.setIntent(new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS));
		} else if (sdkVer == 4) {
			Intent intent = new Intent(Intent.ACTION_MAIN);
			intent.setClassName("com.android.settings", "com.android.settings.AccessibilitySettings");
			accessPref.setIntent(intent);
		}
		
		((Preference)findPreference("appList")).setIntent(new Intent(this, AppList.class));
	}
}

Fix crash in 1.6 at Accessibility settings intent.
Fix crash in 1.6 at Accessibility settings intent.

Check SDK version & launch intent differently for 1.6.

Instead of OnPreferenceClickListener, use .setIntent on preference.
