Upgrade to the latest server protocol.
[fonbot.git] / src / ro / ieval / fonbot / FonBotMainActivity.java
index 92a81af7ec4c70d57b9a89d53894758f669894cc..7ef45b849c485400cfc83276141a1fdb382ab67a 100644 (file)
@@ -1,25 +1,22 @@
 package ro.ieval.fonbot;
 
-import static ro.ieval.fonbot.R.string.*;
-
+import static ro.ieval.fonbot.R.string.logging_in;
 import static ro.ieval.fonbot.Utils.toNonNull;
 
-import java.util.Arrays;
+import java.util.Collections;
+
 import org.eclipse.jdt.annotation.Nullable;
 
 import ro.ieval.fonbot.FonBotMainService.Binder;
 import ro.ieval.fonbot.Utils.OngoingEvent;
-
 import android.app.ListActivity;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.os.IBinder;
-import android.preference.PreferenceManager;
 import android.support.v4.content.LocalBroadcastManager;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -204,14 +201,9 @@ public final class FonBotMainActivity extends ListActivity {
        @Override
        protected void onStart() {
                super.onStart();
-               final SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
                resultTextView.setText(logging_in);
-               new SendHttpMessageAsyncTask(toNonNull(Arrays.asList(
-                               new Header("X-Action","LOGIN")
-                               )),LOGIN_BROADCAST,this).execute(
-                                               sp.getString("username", null),
-                                               sp.getString("password", null)
-                                               );
+               new SendHttpMessageAsyncTask("/ok", toNonNull(Collections.<Header>emptySet()),
+                               LOGIN_BROADCAST,this).execute();
                connection.refreshAdapter();
        }
 
This page took 0.010193 seconds and 4 git commands to generate.