2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-02 23:25:10 +00:00

Spam less to the error channel

This commit is contained in:
Albert Vaca
2013-09-05 10:48:42 +02:00
parent c17c9e7073
commit 1eb99194fe
17 changed files with 41 additions and 56 deletions

View File

@@ -78,17 +78,17 @@ public class BackgroundService extends Service {
@Override @Override
public void onConnectionReceived(final NetworkPackage identityPackage, final BaseComputerLink link) { public void onConnectionReceived(final NetworkPackage identityPackage, final BaseComputerLink link) {
Log.e("BackgroundService", "Connection accepted!"); Log.i("BackgroundService", "Connection accepted!");
String deviceId = identityPackage.getString("deviceId"); String deviceId = identityPackage.getString("deviceId");
Device device = devices.get(deviceId); Device device = devices.get(deviceId);
if (device != null) { if (device != null) {
Log.e("BackgroundService", "addLink, known device: "+deviceId); Log.i("BackgroundService", "addLink, known device: "+deviceId);
device.addLink(link); device.addLink(link);
} else { } else {
Log.e("BackgroundService", "addLink,unknown device: "+deviceId); Log.i("BackgroundService", "addLink,unknown device: "+deviceId);
String name = identityPackage.getString("deviceName"); String name = identityPackage.getString("deviceName");
device = new Device(getBaseContext(), deviceId, name, link); device = new Device(getBaseContext(), deviceId, name, link);
devices.put(deviceId, device); devices.put(deviceId, device);
@@ -101,7 +101,7 @@ public class BackgroundService extends Service {
@Override @Override
public void onConnectionLost(BaseComputerLink link) { public void onConnectionLost(BaseComputerLink link) {
Device d = devices.get(link.getDeviceId()); Device d = devices.get(link.getDeviceId());
Log.e("onConnectionLost","removeLink, deviceId: "+link.getDeviceId()); Log.i("onConnectionLost","removeLink, deviceId: "+link.getDeviceId());
if (d != null) { if (d != null) {
d.removeLink(link); d.removeLink(link);
if (!d.isReachable() && !d.isPaired()) { if (!d.isReachable() && !d.isPaired()) {

View File

@@ -11,7 +11,7 @@ public class LanComputerLink extends BaseComputerLink {
private IoSession session = null; private IoSession session = null;
public void disconnect() { public void disconnect() {
Log.e("LanComputerLink","Disconnect: "+session.getRemoteAddress().toString()); Log.i("LanComputerLink","Disconnect: "+session.getRemoteAddress().toString());
session.close(true); session.close(true);
} }
@@ -22,9 +22,8 @@ public class LanComputerLink extends BaseComputerLink {
@Override @Override
public boolean sendPackage(NetworkPackage np) { public boolean sendPackage(NetworkPackage np) {
Log.e("TcpComputerLink", "sendPackage");
if (session == null) { if (session == null) {
Log.e("TcpComputerLink","not yet connected"); Log.e("LanComputerLink","sendPackage failed: not yet connected");
return false; return false;
} else { } else {
session.write(np.serialize()); session.write(np.serialize());

View File

@@ -203,7 +203,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
public void acceptPairing() { public void acceptPairing() {
Log.e("Device","Accepted pairing"); Log.i("Device","Accepted pairing");
//Send our own public key //Send our own public key
NetworkPackage np = NetworkPackage.createPublicKeyPackage(context); NetworkPackage np = NetworkPackage.createPublicKeyPackage(context);
@@ -232,7 +232,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
public void rejectPairing() { public void rejectPairing() {
Log.e("Device","Rejected pairing"); Log.i("Device","Rejected pairing");
pairStatus = PairStatus.NotPaired; pairStatus = PairStatus.NotPaired;
@@ -259,7 +259,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
links.add(link); links.add(link);
Log.e("Device","addLink "+link.getLinkProvider().getName()+" -> "+getName() + " active links: "+ links.size()); Log.i("Device","addLink "+link.getLinkProvider().getName()+" -> "+getName() + " active links: "+ links.size());
Collections.sort(links, new Comparator<BaseComputerLink>() { Collections.sort(links, new Comparator<BaseComputerLink>() {
@Override @Override
@@ -278,7 +278,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
public void removeLink(BaseComputerLink link) { public void removeLink(BaseComputerLink link) {
link.removePackageReceiver(this); link.removePackageReceiver(this);
links.remove(link); links.remove(link);
Log.e("Device","removeLink: "+link.getLinkProvider().getName() + " -> "+getName() + " active links: "+ links.size()); Log.i("Device","removeLink: "+link.getLinkProvider().getName() + " -> "+getName() + " active links: "+ links.size());
if (links.isEmpty()) { if (links.isEmpty()) {
reloadPluginsFromSettings(); reloadPluginsFromSettings();
} }
@@ -289,7 +289,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
if (np.getType().equals(NetworkPackage.PACKAGE_TYPE_PAIR)) { if (np.getType().equals(NetworkPackage.PACKAGE_TYPE_PAIR)) {
Log.e("Device","Pair package"); Log.i("Device","Pair package");
boolean wantsPair = np.getBoolean("pair"); boolean wantsPair = np.getBoolean("pair");
@@ -318,7 +318,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
if (pairStatus == PairStatus.Requested) { //We started pairing if (pairStatus == PairStatus.Requested) { //We started pairing
Log.e("Pairing","Pair answer"); Log.i("Pairing","Pair answer");
pairStatus = PairStatus.Paired; pairStatus = PairStatus.Paired;
pairingTimer.cancel(); pairingTimer.cancel();
@@ -340,7 +340,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
} else { } else {
Log.e("Pairing","Pair request"); Log.i("Pairing","Pair request");
Intent intent = new Intent(context, PairActivity.class); Intent intent = new Intent(context, PairActivity.class);
intent.putExtra("deviceId", deviceId); intent.putExtra("deviceId", deviceId);
@@ -377,7 +377,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
} }
} else { } else {
Log.e("Pairing","Unpair request"); Log.i("Pairing","Unpair request");
if (pairStatus == PairStatus.Requested) { if (pairStatus == PairStatus.Requested) {
pairingTimer.cancel(); pairingTimer.cancel();
@@ -438,7 +438,6 @@ public class Device implements BaseComputerLink.PackageReceiver {
new AsyncTask<Void,Void,Void>() { new AsyncTask<Void,Void,Void>() {
@Override @Override
protected Void doInBackground(Void... voids) { protected Void doInBackground(Void... voids) {
//Log.e("sendPackage","Do in background");
for(BaseComputerLink link : links) { for(BaseComputerLink link : links) {
//Log.e("sendPackage","Trying "+link.getLinkProvider().getName()); //Log.e("sendPackage","Trying "+link.getLinkProvider().getName());
if (link.sendPackage(np)) { if (link.sendPackage(np)) {
@@ -471,7 +470,7 @@ public class Device implements BaseComputerLink.PackageReceiver {
private void addPlugin(final String name) { private void addPlugin(final String name) {
Plugin existing = plugins.get(name); Plugin existing = plugins.get(name);
if (existing != null) { if (existing != null) {
Log.e("addPlugin","plugin already present:" + name); Log.w("addPlugin","plugin already present:" + name);
return; return;
} }
@@ -568,7 +567,6 @@ public class Device implements BaseComputerLink.PackageReceiver {
if (isPaired() && isReachable()) { if (isPaired() && isReachable()) {
enabled = isPluginEnabled(pluginName); enabled = isPluginEnabled(pluginName);
} }
//Log.e("reloadPluginsFromSettings",pluginName+"->"+enabled);
if (enabled) { if (enabled) {
addPlugin(pluginName); addPlugin(pluginName);
} else { } else {

View File

@@ -11,7 +11,7 @@ public class ContactsHelper {
public static String phoneNumberLookup(Context context, String number) { public static String phoneNumberLookup(Context context, String number) {
Log.e("PhoneNumberLookup", number); //Log.e("PhoneNumberLookup", number);
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)); Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
Cursor cursor = null; Cursor cursor = null;
@@ -34,7 +34,7 @@ public class ContactsHelper {
int nameIndex = cursor.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME); int nameIndex = cursor.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME);
if (nameIndex != -1) { if (nameIndex != -1) {
String name = cursor.getString(nameIndex); String name = cursor.getString(nameIndex);
Log.e("PhoneNumberLookup", "success: " + name); //Log.e("PhoneNumberLookup", "success: " + name);
return name; return name;
} }
} }

View File

@@ -13,14 +13,14 @@ public class KdeConnectBroadcastReceiver extends BroadcastReceiver
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Log.e("KdeConnect", "Broadcast event: "+intent.getAction()); //Log.e("KdeConnect", "Broadcast event: "+intent.getAction());
String action = intent.getAction(); String action = intent.getAction();
if(action.equals(Intent.ACTION_PACKAGE_REPLACED)) { if(action.equals(Intent.ACTION_PACKAGE_REPLACED)) {
Log.e("KdeConnect", "UpdateReceiver"); Log.i("KdeConnect", "UpdateReceiver");
if (!intent.getData().getSchemeSpecificPart().equals(context.getPackageName())) { if (!intent.getData().getSchemeSpecificPart().equals(context.getPackageName())) {
Log.e("KdeConnect", "Ignoring, it's not me!"); Log.i("KdeConnect", "Ignoring, it's not me!");
return; return;
} }
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() { BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@@ -30,7 +30,7 @@ public class KdeConnectBroadcastReceiver extends BroadcastReceiver
} }
}); });
} else if (action.equals(Intent.ACTION_BOOT_COMPLETED)) { } else if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
Log.e("KdeConnect", "KdeConnectBroadcastReceiver"); Log.i("KdeConnect", "KdeConnectBroadcastReceiver");
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() { BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@Override @Override
public void onServiceStart(BackgroundService service) { public void onServiceStart(BackgroundService service) {
@@ -41,7 +41,7 @@ public class KdeConnectBroadcastReceiver extends BroadcastReceiver
|| action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION) || action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)
|| action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || action.equals(ConnectivityManager.CONNECTIVITY_ACTION)
) { ) {
Log.e("KdeConnect", "Connection state changed, trying to connect"); Log.i("KdeConnect", "Connection state changed, trying to connect");
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() { BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@Override @Override
public void onServiceStart(BackgroundService service) { public void onServiceStart(BackgroundService service) {
@@ -56,7 +56,7 @@ public class KdeConnectBroadcastReceiver extends BroadcastReceiver
} }
}); });
} else { } else {
Log.e("KdeConnectBroadcastReceiver", "Ignoring broadcast event: "+intent.getAction()); Log.i("KdeConnectBroadcastReceiver", "Ignoring broadcast event: "+intent.getAction());
} }
} }

View File

@@ -26,13 +26,13 @@ public abstract class BaseLinkProvider {
//These two should be called when the provider links to a new computer //These two should be called when the provider links to a new computer
protected void connectionAccepted(NetworkPackage identityPackage, BaseComputerLink link) { protected void connectionAccepted(NetworkPackage identityPackage, BaseComputerLink link) {
Log.e("LinkProvider", "connectionAccepted"); Log.i("LinkProvider", "connectionAccepted");
for(ConnectionReceiver cr : connectionReceivers) { for(ConnectionReceiver cr : connectionReceivers) {
cr.onConnectionReceived(identityPackage, link); cr.onConnectionReceived(identityPackage, link);
} }
} }
protected void connectionLost(BaseComputerLink link) { protected void connectionLost(BaseComputerLink link) {
Log.e("LinkProvider", "connectionLost"); Log.i("LinkProvider", "connectionLost");
for(ConnectionReceiver cr : connectionReceivers) { for(ConnectionReceiver cr : connectionReceivers) {
cr.onConnectionLost(link); cr.onConnectionLost(link);
} }

View File

@@ -88,7 +88,7 @@ public class LanLinkProvider extends BaseLinkProvider {
public void messageReceived(IoSession udpSession, Object message) throws Exception { public void messageReceived(IoSession udpSession, Object message) throws Exception {
super.messageReceived(udpSession, message); super.messageReceived(udpSession, message);
Log.e("LanLinkProvider", "Udp message received (" + message.getClass() + ") " + message.toString()); //Log.e("LanLinkProvider", "Udp message received (" + message.getClass() + ") " + message.toString());
NetworkPackage np = null; NetworkPackage np = null;
@@ -114,7 +114,7 @@ public class LanLinkProvider extends BaseLinkProvider {
} }
} }
Log.e("LanLinkProvider", "It is an identity package, creating link"); Log.i("LanLinkProvider", "Identity package received, creating link");
try { try {
final InetSocketAddress address = (InetSocketAddress) udpSession.getRemoteAddress(); final InetSocketAddress address = (InetSocketAddress) udpSession.getRemoteAddress();
@@ -136,7 +136,7 @@ public class LanLinkProvider extends BaseLinkProvider {
public void operationComplete(IoFuture ioFuture) { public void operationComplete(IoFuture ioFuture) {
IoSession session = ioFuture.getSession(); IoSession session = ioFuture.getSession();
Log.e("LanLinkProvider", "Connection successful: " + session.isConnected()); Log.i("LanLinkProvider", "Connection successful: " + session.isConnected());
LanComputerLink link = new LanComputerLink(session, identityPackage.getString("deviceId"), LanLinkProvider.this); LanComputerLink link = new LanComputerLink(session, identityPackage.getString("deviceId"), LanLinkProvider.this);
@@ -159,12 +159,12 @@ public class LanLinkProvider extends BaseLinkProvider {
private void addLink(NetworkPackage identityPackage, LanComputerLink link) { private void addLink(NetworkPackage identityPackage, LanComputerLink link) {
String deviceId = identityPackage.getString("deviceId"); String deviceId = identityPackage.getString("deviceId");
Log.e("LanLinkProvider","addLink to "+deviceId); Log.i("LanLinkProvider","addLink to "+deviceId);
LanComputerLink oldLink = visibleComputers.get(deviceId); LanComputerLink oldLink = visibleComputers.get(deviceId);
visibleComputers.put(deviceId, link); visibleComputers.put(deviceId, link);
connectionAccepted(identityPackage, link); connectionAccepted(identityPackage, link);
if (oldLink != null) { if (oldLink != null) {
Log.e("LanLinkProvider","Removing old connection to same device"); Log.i("LanLinkProvider","Removing old connection to same device");
oldLink.disconnect(); oldLink.disconnect();
connectionLost(oldLink); connectionLost(oldLink);
} }
@@ -258,8 +258,6 @@ public class LanLinkProvider extends BaseLinkProvider {
@Override @Override
public void onNetworkChange() { public void onNetworkChange() {
Log.e("LanLinkProvider","OnNetworkChange: " + (udpAcceptor != null));
onStop(); onStop();
onStart(); onStart();

View File

@@ -104,12 +104,12 @@ public class NetworkPackage {
} }
//QJSon does not escape slashes, but Java JSONObject does. Converting to QJson format. //QJSon does not escape slashes, but Java JSONObject does. Converting to QJson format.
String json = jo.toString().replace("\\/","/")+"\n"; String json = jo.toString().replace("\\/","/")+"\n";
Log.e("NetworkPackage.serialize",json); //Log.e("NetworkPackage.serialize",json);
return json; return json;
} }
static public NetworkPackage unserialize(String s) { static public NetworkPackage unserialize(String s) {
Log.e("NetworkPackage.unserialize", s); //Log.e("NetworkPackage.unserialize", s);
NetworkPackage np = new NetworkPackage(); NetworkPackage np = new NetworkPackage();
try { try {
JSONObject jo = new JSONObject(s); JSONObject jo = new JSONObject(s);
@@ -156,7 +156,7 @@ public class NetworkPackage {
Log.e("NetworkPackage","Exception"); Log.e("NetworkPackage","Exception");
} }
Log.e("NetworkPackage", "Encrypted " + chunks.length()+" chunks"); Log.i("NetworkPackage", "Encrypted " + chunks.length()+" chunks");
} }

View File

@@ -55,7 +55,7 @@ public class BatteryPlugin extends Plugin {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Log.e("BatteryPlugin", "Battery event"); Log.i("BatteryPlugin", "Battery event");
boolean isCharging = (0 != intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0)); boolean isCharging = (0 != intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0));

View File

@@ -35,8 +35,6 @@ public class MprisActivity extends Activity {
@Override @Override
public void onServiceStart(BackgroundService service) { public void onServiceStart(BackgroundService service) {
Log.e("MprisActivity", "onService start");
Device device = service.getDevice(deviceId); Device device = service.getDevice(deviceId);
final MprisPlugin mpris = (MprisPlugin) device.getPlugin("plugin_mpris"); final MprisPlugin mpris = (MprisPlugin) device.getPlugin("plugin_mpris");
if (mpris == null) { if (mpris == null) {
@@ -86,14 +84,11 @@ public class MprisActivity extends Activity {
//String prevPlayer = (String)spinner.getSelectedItem(); //String prevPlayer = (String)spinner.getSelectedItem();
spinner.setAdapter(adapter); spinner.setAdapter(adapter);
Log.e("MprisActivity", "playerListUpdatedHandler");
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override @Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int pos, long id) { public void onItemSelected(AdapterView<?> arg0, View arg1, int pos, long id) {
((TextView) findViewById(R.id.now_playing_textview)).setText(""); ((TextView) findViewById(R.id.now_playing_textview)).setText("");
String player = playerList.get(pos); String player = playerList.get(pos);
Log.e("MprisActivity", "onPlayerSelected: " + player);
mpris.setPlayer(player); mpris.setPlayer(player);
//Spotify doesn't support changing the volume yet... //Spotify doesn't support changing the volume yet...
if (player.equals("Spotify")) { if (player.equals("Spotify")) {

View File

@@ -27,7 +27,7 @@ public class NotificationReceiver extends NotificationListenerService {
@Override @Override
public void onNotificationPosted(StatusBarNotification statusBarNotification) { public void onNotificationPosted(StatusBarNotification statusBarNotification) {
Log.e("NotificationReceiver.onNotificationPosted","listeners: " + listeners.size()); Log.i("NotificationReceiver.onNotificationPosted","listeners: " + listeners.size());
for(NotificationListener listener : listeners) { for(NotificationListener listener : listeners) {
listener.onNotificationPosted(statusBarNotification); listener.onNotificationPosted(statusBarNotification);
} }
@@ -49,7 +49,7 @@ public class NotificationReceiver extends NotificationListenerService {
//This will be called for each intent launch, even if the service is already started and is reused //This will be called for each intent launch, even if the service is already started and is reused
@Override @Override
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
Log.e("NotificationReceiver", "onStartCommand"); Log.i("NotificationReceiver", "onStartCommand");
for (InstanceCallback c : callbacks) { for (InstanceCallback c : callbacks) {
c.onServiceStart(this); c.onServiceStart(this);
} }

View File

@@ -84,11 +84,11 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
} catch(Exception e) { } catch(Exception e) {
nid.id = 0; nid.id = 0;
} }
Log.e("NotificationId","unserialize: " + nid.packageName+ ", "+nid.tag+ ", "+nid.id); //Log.e("NotificationId","unserialize: " + nid.packageName+ ", "+nid.tag+ ", "+nid.id);
return nid; return nid;
} }
public String serialize() { public String serialize() {
Log.e("NotificationId","serialize: " + packageName+ ", "+tag+ ", "+id); //Log.e("NotificationId","serialize: " + packageName+ ", "+tag+ ", "+id);
String safePackageName = (packageName == null)? "" : packageName; String safePackageName = (packageName == null)? "" : packageName;
String safeTag = (tag == null)? "" : tag; String safeTag = (tag == null)? "" : tag;
return safePackageName+":"+safeTag+":"+id; return safePackageName+":"+safeTag+":"+id;
@@ -115,7 +115,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
@Override @Override
public boolean onCreate() { public boolean onCreate() {
Log.e("NotificationsPlugin", "onCreate");
if (Build.VERSION.SDK_INT < 18) return false; if (Build.VERSION.SDK_INT < 18) return false;
@@ -267,7 +266,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
} else { } else {
Log.e("NotificationsPlugin","Nothing to do"); Log.w("NotificationsPlugin","Nothing to do");
} }

View File

@@ -55,7 +55,7 @@ public class TelephonyPlugin extends Plugin {
String action = intent.getAction(); String action = intent.getAction();
Log.e("TelephonyPlugin","Telephony event: " + action); //Log.e("TelephonyPlugin","Telephony event: " + action);
if("android.provider.Telephony.SMS_RECEIVED".equals(action)) { if("android.provider.Telephony.SMS_RECEIVED".equals(action)) {
@@ -140,7 +140,7 @@ public class TelephonyPlugin extends Plugin {
public void smsBroadcastReceived(SmsMessage message) { public void smsBroadcastReceived(SmsMessage message) {
Log.e("SmsBroadcastReceived", message.toString()); //Log.e("SmsBroadcastReceived", message.toString());
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_TELEPHONY); NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_TELEPHONY);

View File

@@ -38,7 +38,6 @@ public class DeviceActivity extends ActionBarActivity {
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
Log.e("MainActivity", "updateComputerList");
//Errors list //Errors list
final HashMap<String, Plugin> failedPlugins = device.getFailedPlugins(); final HashMap<String, Plugin> failedPlugins = device.getFailedPlugins();

View File

@@ -89,7 +89,6 @@ public class MainActivity extends ActionBarActivity {
// //
void updateComputerList() { void updateComputerList() {
Log.e("MainActivity","updateComputerList");
BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() { BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() {
@Override @Override

View File

@@ -16,7 +16,6 @@ public class PreferenceListAdapter extends ArrayAdapter<Preference> {
public PreferenceListAdapter(Context context, ArrayList<Preference> items) { public PreferenceListAdapter(Context context, ArrayList<Preference> items) {
super(context,0, items); super(context,0, items);
Log.e("PreferenceListAdapter", ""+items.size());
localList = items; localList = items;
} }

View File

@@ -31,7 +31,6 @@ public class SettingsActivity extends ListActivity {
final ArrayList<Preference> preferences = new ArrayList<Preference>(); final ArrayList<Preference> preferences = new ArrayList<Preference>();
for (final String pluginName : plugins) { for (final String pluginName : plugins) {
Log.e("SettingsActivity", pluginName);
CheckBoxPreference pref = new CheckBoxPreference(getBaseContext()); CheckBoxPreference pref = new CheckBoxPreference(getBaseContext());
PluginFactory.PluginInfo info = PluginFactory.getPluginInfo(getBaseContext(), pluginName); PluginFactory.PluginInfo info = PluginFactory.getPluginInfo(getBaseContext(), pluginName);
pref.setKey(pluginName); pref.setKey(pluginName);