|
@@ -11,9 +11,13 @@ import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import com.usai.util.Network;
|
|
import com.usai.util.Network;
|
|
|
import com.usai.util.dbUtil;
|
|
import com.usai.util.dbUtil;
|
|
|
|
|
+import com.usai.util.dbgUtil;
|
|
|
|
|
|
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.Bitmap;
|
|
|
import android.graphics.BitmapFactory;
|
|
import android.graphics.BitmapFactory;
|
|
|
|
|
+import android.location.Location;
|
|
|
|
|
+import android.location.LocationListener;
|
|
|
|
|
+import android.location.LocationManager;
|
|
|
import android.media.ThumbnailUtils;
|
|
import android.media.ThumbnailUtils;
|
|
|
import android.net.Uri;
|
|
import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
@@ -71,6 +75,13 @@ public class MainActivity extends Activity
|
|
|
// String m_sPassword;
|
|
// String m_sPassword;
|
|
|
ArrayList<String> photoList = new ArrayList<String>();
|
|
ArrayList<String> photoList = new ArrayList<String>();
|
|
|
|
|
|
|
|
|
|
+ // @Override
|
|
|
|
|
+ // protected void onResume()
|
|
|
|
|
+ // {
|
|
|
|
|
+ // //sendBroadcast(new Intent("REDANT.POP.REQUEST_LOCATION_CHANGED"));
|
|
|
|
|
+ // super.onResume();
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
private void StartCamera()
|
|
private void StartCamera()
|
|
|
{
|
|
{
|
|
|
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
|
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
|
@@ -108,6 +119,7 @@ public class MainActivity extends Activity
|
|
|
{
|
|
{
|
|
|
if (keyCode == KeyEvent.KEYCODE_BACK)
|
|
if (keyCode == KeyEvent.KEYCODE_BACK)
|
|
|
{
|
|
{
|
|
|
|
|
+ dbgUtil.fileLog("back button click , clear&exit");
|
|
|
clear();
|
|
clear();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -115,13 +127,30 @@ public class MainActivity extends Activity
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ protected void onResume()
|
|
|
|
|
+ {
|
|
|
|
|
+ sendBroadcast(new Intent("REDANT.POP.GPS_ON"));
|
|
|
|
|
+ super.onResume();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ protected void onPause()
|
|
|
|
|
+ {
|
|
|
|
|
+ sendBroadcast(new Intent("REDANT.POP.GPS_OFF"));
|
|
|
|
|
+ // TODO Auto-generated method stub
|
|
|
|
|
+ super.onPause();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState)
|
|
protected void onCreate(Bundle savedInstanceState)
|
|
|
{
|
|
{
|
|
|
Log.d(TAG, "=======================>MainActivity Created!");
|
|
Log.d(TAG, "=======================>MainActivity Created!");
|
|
|
super.onCreate(savedInstanceState);
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
+
|
|
|
setContentView(R.layout.activity_main1);
|
|
setContentView(R.layout.activity_main1);
|
|
|
|
|
|
|
|
|
|
+ setTitle(getTitle() + "(" + RedAntApplication.station_name + ")");
|
|
|
ImageView thumbsImageView = (ImageView) findViewById(R.id.ivThumbs);
|
|
ImageView thumbsImageView = (ImageView) findViewById(R.id.ivThumbs);
|
|
|
thumbsImageView.setOnClickListener(new View.OnClickListener()
|
|
thumbsImageView.setOnClickListener(new View.OnClickListener()
|
|
|
{
|
|
{
|
|
@@ -147,7 +176,8 @@ public class MainActivity extends Activity
|
|
|
IntentFilter msgFilter = new IntentFilter();
|
|
IntentFilter msgFilter = new IntentFilter();
|
|
|
Intent intent = getIntent();
|
|
Intent intent = getIntent();
|
|
|
msgFilter.addAction("android.intent.action.SCREEN_OFF");
|
|
msgFilter.addAction("android.intent.action.SCREEN_OFF");
|
|
|
- // msgFilter.addAction("REDANT.POP.USER_CHECK_FAILED");
|
|
|
|
|
|
|
+ msgFilter.addAction("REDANT.POP.STATION_CHANGE");
|
|
|
|
|
+ msgFilter.addAction("REDANT.POP.STATION_NOT_CHANGE");
|
|
|
msgFilter.addAction("REDANT.POP.FINISH_UPLOAD_QUEUE");
|
|
msgFilter.addAction("REDANT.POP.FINISH_UPLOAD_QUEUE");
|
|
|
msgFilter.addAction("REDANT.POP.FINISH_UPLOAD_QUEUE_WITH_ERROR");
|
|
msgFilter.addAction("REDANT.POP.FINISH_UPLOAD_QUEUE_WITH_ERROR");
|
|
|
msgFilter.setPriority(2147483647);
|
|
msgFilter.setPriority(2147483647);
|
|
@@ -161,6 +191,9 @@ public class MainActivity extends Activity
|
|
|
// ArrayList list = (ArrayList)
|
|
// ArrayList list = (ArrayList)
|
|
|
// Arrays.asList(savedInstanceState.getStringArray("arrayLabel"));
|
|
// Arrays.asList(savedInstanceState.getStringArray("arrayLabel"));
|
|
|
photoList = savedInstanceState.getStringArrayList("photoList");
|
|
photoList = savedInstanceState.getStringArrayList("photoList");
|
|
|
|
|
+
|
|
|
|
|
+ TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
|
|
|
+ pidval.setText(savedInstanceState.getString("PIID"));
|
|
|
// photoList = A
|
|
// photoList = A
|
|
|
// savedInstanceState.getStringArrayList("photoList");
|
|
// savedInstanceState.getStringArrayList("photoList");
|
|
|
photoFile = (File) savedInstanceState.getSerializable("photoFile");
|
|
photoFile = (File) savedInstanceState.getSerializable("photoFile");
|
|
@@ -209,27 +242,10 @@ public class MainActivity extends Activity
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View v)
|
|
public void onClick(View v)
|
|
|
{
|
|
{
|
|
|
- SQLiteDatabase db = dbUtil
|
|
|
|
|
- .OpenDB(MainActivity.this, null, true);
|
|
|
|
|
- TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
|
|
|
- String pid = pidval.getText().toString();
|
|
|
|
|
- for (int i = 0; i < photoList.size(); i++)
|
|
|
|
|
- {
|
|
|
|
|
|
|
|
|
|
- ContentValues cv = new ContentValues();
|
|
|
|
|
- cv.put("picker", RedAntApplication.user);
|
|
|
|
|
- cv.put("server", RedAntApplication.active_address);
|
|
|
|
|
- cv.put("err_code", Network.STATUS_WAIT);
|
|
|
|
|
- cv.put("pid", pid);
|
|
|
|
|
- cv.put("local_path", photoList.get(i));
|
|
|
|
|
- db.insert("pics", null, cv);
|
|
|
|
|
|
|
+ sendBroadcast(new Intent("REDANT.POP.REQUEST_LOCATION"));
|
|
|
|
|
+ return;
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- dbUtil.CloseDB(db);
|
|
|
|
|
- // new UploadTask().execute((Void) null);
|
|
|
|
|
- clearfornew();
|
|
|
|
|
- Intent intent = new Intent("REDANT.POP.MODIFY_QUEUE");
|
|
|
|
|
- sendBroadcast(intent);
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -238,13 +254,13 @@ public class MainActivity extends Activity
|
|
|
|
|
|
|
|
// Intent intent = ;
|
|
// Intent intent = ;
|
|
|
sendBroadcast(new Intent("REDANT.POP.MODIFY_QUEUE"));
|
|
sendBroadcast(new Intent("REDANT.POP.MODIFY_QUEUE"));
|
|
|
-
|
|
|
|
|
|
|
+ updateUploadButton();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected void onDestroy()
|
|
protected void onDestroy()
|
|
|
{
|
|
{
|
|
|
- // TODO Auto-generated method stub
|
|
|
|
|
|
|
+ // sendBroadcast(new Intent("REDANT.POP.GPS_OFF"));
|
|
|
Log.d(TAG, "=======================>MainActivity Destroyed!");
|
|
Log.d(TAG, "=======================>MainActivity Destroyed!");
|
|
|
unregisterReceiver(MainActivityReceiver);
|
|
unregisterReceiver(MainActivityReceiver);
|
|
|
Log.d(TAG, "=======================>msgFilter unregisted!");
|
|
Log.d(TAG, "=======================>msgFilter unregisted!");
|
|
@@ -275,6 +291,7 @@ public class MainActivity extends Activity
|
|
|
File dir3 = new File(Environment.getExternalStorageDirectory()
|
|
File dir3 = new File(Environment.getExternalStorageDirectory()
|
|
|
.getPath() + "/redant/pop/temp");
|
|
.getPath() + "/redant/pop/temp");
|
|
|
|
|
|
|
|
|
|
+
|
|
|
if (!dir1.exists())
|
|
if (!dir1.exists())
|
|
|
{
|
|
{
|
|
|
boolean b = dir1.mkdir();
|
|
boolean b = dir1.mkdir();
|
|
@@ -422,7 +439,7 @@ public class MainActivity extends Activity
|
|
|
+ bundle.getString("pid"));
|
|
+ bundle.getString("pid"));
|
|
|
TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
|
pidval.setText(pid);
|
|
pidval.setText(pid);
|
|
|
- updateUploadButton();
|
|
|
|
|
|
|
+ updateUploadButton();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
@@ -468,6 +485,13 @@ public class MainActivity extends Activity
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // boolean confirm_upload()
|
|
|
|
|
+ // {
|
|
|
|
|
+ // boolean bret = false;
|
|
|
|
|
+ // final Boolean b;
|
|
|
|
|
+ //
|
|
|
|
|
+ // return bret;
|
|
|
|
|
+ // }
|
|
|
@Override
|
|
@Override
|
|
|
public boolean onOptionsItemSelected(MenuItem item)
|
|
public boolean onOptionsItemSelected(MenuItem item)
|
|
|
{
|
|
{
|
|
@@ -475,6 +499,7 @@ public class MainActivity extends Activity
|
|
|
switch (item.getItemId())
|
|
switch (item.getItemId())
|
|
|
{
|
|
{
|
|
|
case R.id.action_clear:
|
|
case R.id.action_clear:
|
|
|
|
|
+ dbgUtil.fileLog("menu item clear click , clear...");
|
|
|
clear();
|
|
clear();
|
|
|
break;
|
|
break;
|
|
|
case R.id.action_type_pid:
|
|
case R.id.action_type_pid:
|
|
@@ -514,11 +539,11 @@ public class MainActivity extends Activity
|
|
|
case R.id.action_server_settings:
|
|
case R.id.action_server_settings:
|
|
|
{
|
|
{
|
|
|
Intent intent = new Intent();
|
|
Intent intent = new Intent();
|
|
|
- intent.setClass(MainActivity.this,ServerSettingActivity.class);
|
|
|
|
|
|
|
+ intent.setClass(MainActivity.this, ServerSettingActivity.class);
|
|
|
startActivity(intent);
|
|
startActivity(intent);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- break;
|
|
|
|
|
|
|
+ break;
|
|
|
case R.id.action_view_queue:
|
|
case R.id.action_view_queue:
|
|
|
{
|
|
{
|
|
|
Intent intent = new Intent();
|
|
Intent intent = new Intent();
|
|
@@ -550,7 +575,9 @@ public class MainActivity extends Activity
|
|
|
|
|
|
|
|
outState.putStringArrayList("photoList", photoList);
|
|
outState.putStringArrayList("photoList", photoList);
|
|
|
// Log.d(TAG, "save thumbpath==" + thumbpath);
|
|
// Log.d(TAG, "save thumbpath==" + thumbpath);
|
|
|
- outState.putInt("iPhotoCount", photoList.size());
|
|
|
|
|
|
|
+ //outState.putInt("iPhotoCount", photoList.size());
|
|
|
|
|
+ TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
|
|
|
+ outState.putString("PIID", pidval.getText().toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static byte[] getBytes(Bitmap bitmap)
|
|
public static byte[] getBytes(Bitmap bitmap)
|
|
@@ -572,8 +599,65 @@ public class MainActivity extends Activity
|
|
|
{
|
|
{
|
|
|
for (int i = 0; i < photoList.size(); i++)
|
|
for (int i = 0; i < photoList.size(); i++)
|
|
|
{
|
|
{
|
|
|
- File file = new File(photoList.get(i));
|
|
|
|
|
- file.delete();
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ String timeStamp = new SimpleDateFormat("yyyy_MM_dd")
|
|
|
|
|
+ .format(new Date());
|
|
|
|
|
+
|
|
|
|
|
+ File storageDir = new File(Environment.getExternalStorageDirectory()
|
|
|
|
|
+ .getPath() + "/redant/pop/clear/"+timeStamp);
|
|
|
|
|
+
|
|
|
|
|
+ if (!storageDir.exists())
|
|
|
|
|
+ storageDir.mkdirs();
|
|
|
|
|
+
|
|
|
|
|
+// File dir1 = new File(Environment.getExternalStorageDirectory()
|
|
|
|
|
+// .getPath() + "/redant");
|
|
|
|
|
+// File dir2 = new File(Environment.getExternalStorageDirectory()
|
|
|
|
|
+// .getPath() + "/redant/pop");
|
|
|
|
|
+// File dir3 = new File(Environment.getExternalStorageDirectory()
|
|
|
|
|
+// .getPath() + "/redant/pop/clear");
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// if (!dir1.exists())
|
|
|
|
|
+// {
|
|
|
|
|
+// boolean b = dir1.mkdir();
|
|
|
|
|
+// }
|
|
|
|
|
+// if (!dir2.exists())
|
|
|
|
|
+// {
|
|
|
|
|
+// boolean b = dir2.mkdir();
|
|
|
|
|
+// }
|
|
|
|
|
+// if (!dir3.exists())
|
|
|
|
|
+// {
|
|
|
|
|
+// boolean b = dir3.mkdir();
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// if (!storageDir.exists())
|
|
|
|
|
+// {
|
|
|
|
|
+// boolean b = storageDir.mkdir();
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+ File srcFile = new File(photoList.get(i));
|
|
|
|
|
+ // file.delete();
|
|
|
|
|
+ dbgUtil.fileLog("move file "+srcFile.getName()+" to "+Environment.getExternalStorageDirectory()
|
|
|
|
|
+ .getPath() + "/redant/pop/clear/"+timeStamp + File.separator);
|
|
|
|
|
+ srcFile.renameTo(new File(Environment.getExternalStorageDirectory()
|
|
|
|
|
+ .getPath() + "/redant/pop/clear/"+timeStamp + File.separator + srcFile.getName()));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// // Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
|
|
|
|
|
+// // Log.d(TAG, "DIR:" + storageDir);
|
|
|
|
|
+// LastFileName = storageDir + imageFileName + ".jpg";
|
|
|
|
|
+// Log.d(TAG, "File:" + LastFileName);
|
|
|
|
|
+// File image = File.createTempFile(imageFileName, /* prefix */
|
|
|
|
|
+// ".jpg", /* suffix */
|
|
|
|
|
+// storageDir /* directory */
|
|
|
|
|
+// );
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
photoList.clear();
|
|
photoList.clear();
|
|
|
TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
@@ -623,6 +707,134 @@ public class MainActivity extends Activity
|
|
|
m_tvalert
|
|
m_tvalert
|
|
|
.setText("Upload failed:user verify failure.");
|
|
.setText("Upload failed:user verify failure.");
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if ("REDANT.POP.STATION_NOT_CHANGE"
|
|
|
|
|
+ .equals(action))
|
|
|
|
|
+ {
|
|
|
|
|
+ new AlertDialog.Builder(
|
|
|
|
|
+ MainActivity.this)
|
|
|
|
|
+ .setIconAttribute(
|
|
|
|
|
+ android.R.attr.alertDialogIcon)
|
|
|
|
|
+ .setTitle(
|
|
|
|
|
+ R.string.confirm_to_upload)
|
|
|
|
|
+ .setMessage(
|
|
|
|
|
+ "Upload to station "
|
|
|
|
|
+ + RedAntApplication.station_name)
|
|
|
|
|
+ .setPositiveButton(
|
|
|
|
|
+ android.R.string.ok,
|
|
|
|
|
+ new DialogInterface.OnClickListener()
|
|
|
|
|
+ {
|
|
|
|
|
+ public void onClick(
|
|
|
|
|
+ DialogInterface dialog,
|
|
|
|
|
+ int whichButton)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ SQLiteDatabase db = dbUtil
|
|
|
|
|
+ .OpenDB(MainActivity.this,
|
|
|
|
|
+ null,
|
|
|
|
|
+ true);
|
|
|
|
|
+ TextView pidval = (TextView) findViewById(R.id.pidval);
|
|
|
|
|
+ String pid = pidval
|
|
|
|
|
+ .getText()
|
|
|
|
|
+ .toString();
|
|
|
|
|
+ for (int i = 0; i < photoList
|
|
|
|
|
+ .size(); i++)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ ContentValues cv = new ContentValues();
|
|
|
|
|
+ cv.put("picker",
|
|
|
|
|
+ RedAntApplication.user);
|
|
|
|
|
+ cv.put("server",
|
|
|
|
|
+ RedAntApplication.active_address);
|
|
|
|
|
+ cv.put("err_code",
|
|
|
|
|
+ Network.STATUS_WAIT);
|
|
|
|
|
+ cv.put("pid",
|
|
|
|
|
+ pid);
|
|
|
|
|
+ cv.put("local_path",
|
|
|
|
|
+ photoList
|
|
|
|
|
+ .get(i));
|
|
|
|
|
+ db.insert(
|
|
|
|
|
+ "pics",
|
|
|
|
|
+ null,
|
|
|
|
|
+ cv);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ dbUtil.CloseDB(db);
|
|
|
|
|
+ // new
|
|
|
|
|
+ // UploadTask().execute((Void)
|
|
|
|
|
+ // null);
|
|
|
|
|
+ clearfornew();
|
|
|
|
|
+ sendBroadcast(new Intent(
|
|
|
|
|
+ "REDANT.POP.RESET_LOCATION"));
|
|
|
|
|
+ Intent intent = new Intent(
|
|
|
|
|
+ "REDANT.POP.MODIFY_QUEUE");
|
|
|
|
|
+ sendBroadcast(intent);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .setNegativeButton(
|
|
|
|
|
+ android.R.string.cancel,
|
|
|
|
|
+ new DialogInterface.OnClickListener()
|
|
|
|
|
+ {
|
|
|
|
|
+ public void onClick(
|
|
|
|
|
+ DialogInterface dialog,
|
|
|
|
|
+ int whichButton)
|
|
|
|
|
+ {
|
|
|
|
|
+ // debug
|
|
|
|
|
+ // update_location();
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .create()
|
|
|
|
|
+ .show();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else if ("REDANT.POP.STATION_CHANGE"
|
|
|
|
|
+ .equals(action))
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ sendBroadcast(new Intent(
|
|
|
|
|
+ "REDANT.POP.RESET_LOCATION"));
|
|
|
|
|
+ new AlertDialog.Builder(
|
|
|
|
|
+ MainActivity.this)
|
|
|
|
|
+ .setIconAttribute(
|
|
|
|
|
+ android.R.attr.alertDialogIcon)
|
|
|
|
|
+ .setTitle(
|
|
|
|
|
+ R.string.location_changed)
|
|
|
|
|
+ .setMessage(
|
|
|
|
|
+ "We have detected that your position has changed,do you want to modify the server setting? ")
|
|
|
|
|
+ .setPositiveButton(
|
|
|
|
|
+ android.R.string.ok,
|
|
|
|
|
+ new DialogInterface.OnClickListener()
|
|
|
|
|
+ {
|
|
|
|
|
+ public void onClick(
|
|
|
|
|
+ DialogInterface dialog,
|
|
|
|
|
+ int whichButton)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ Intent intent = new Intent();
|
|
|
|
|
+ intent.setClass(
|
|
|
|
|
+ MainActivity.this,
|
|
|
|
|
+ ServerSettingActivity.class);
|
|
|
|
|
+ startActivity(intent);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .setNegativeButton(
|
|
|
|
|
+ android.R.string.cancel,
|
|
|
|
|
+ new DialogInterface.OnClickListener()
|
|
|
|
|
+ {
|
|
|
|
|
+ public void onClick(
|
|
|
|
|
+ DialogInterface dialog,
|
|
|
|
|
+ int whichButton)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ // debug
|
|
|
|
|
+ // update_location();
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .create()
|
|
|
|
|
+ .show();
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
else if ("REDANT.POP.FINISH_UPLOAD_QUEUE"
|
|
else if ("REDANT.POP.FINISH_UPLOAD_QUEUE"
|
|
|
.equals(action))
|
|
.equals(action))
|
|
@@ -654,13 +866,19 @@ public class MainActivity extends Activity
|
|
|
+ m_blocked);
|
|
+ m_blocked);
|
|
|
if (m_blocked == true)
|
|
if (m_blocked == true)
|
|
|
return;
|
|
return;
|
|
|
-
|
|
|
|
|
- SharedPreferences pref = RedAntApplication.getInstance()
|
|
|
|
|
- .getSharedPreferences("POP", 0);
|
|
|
|
|
- boolean autologin = pref.getBoolean("kepppass", false);
|
|
|
|
|
- if(autologin)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ SharedPreferences pref = RedAntApplication
|
|
|
|
|
+ .getInstance()
|
|
|
|
|
+ .getSharedPreferences(
|
|
|
|
|
+ "POP",
|
|
|
|
|
+ 0);
|
|
|
|
|
+ boolean autologin = pref
|
|
|
|
|
+ .getBoolean(
|
|
|
|
|
+ "kepppass",
|
|
|
|
|
+ false);
|
|
|
|
|
+ if (autologin)
|
|
|
return;
|
|
return;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Intent activityintent = new Intent();
|
|
Intent activityintent = new Intent();
|
|
|
activityintent
|
|
activityintent
|
|
|
.setClass(
|
|
.setClass(
|