mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-12 06:08:25 -05:00
find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren
This commit is contained in:
parent
2775795abe
commit
8af7f4a7b6
@ -186,7 +186,7 @@ public class Account implements BaseAccount
|
||||
for (String type : networkTypes)
|
||||
{
|
||||
Boolean useCompression = preferences.getPreferences().getBoolean(mUuid + ".useCompression." + type,
|
||||
true);
|
||||
true);
|
||||
compressionMap.put(type, useCompression);
|
||||
}
|
||||
|
||||
@ -219,10 +219,10 @@ public class Account implements BaseAccount
|
||||
Random random = new Random((long)mAccountNumber+4);
|
||||
|
||||
mChipColor = preferences.getPreferences().getInt(mUuid+".chipColor",
|
||||
(random.nextInt(0x70) ) +
|
||||
(random.nextInt(0x70) * 0xff ) +
|
||||
(random.nextInt(0x70) * 0xffff ) +
|
||||
0xff000000);
|
||||
(random.nextInt(0x70)) +
|
||||
(random.nextInt(0x70) * 0xff) +
|
||||
(random.nextInt(0x70) * 0xffff) +
|
||||
0xff000000);
|
||||
|
||||
mVibrate = preferences.getPreferences().getBoolean(mUuid + ".vibrate", false);
|
||||
mRing = preferences.getPreferences().getBoolean(mUuid + ".ring", true);
|
||||
@ -499,17 +499,19 @@ public class Account implements BaseAccount
|
||||
long endTime = System.currentTimeMillis();
|
||||
if (K9.DEBUG)
|
||||
Log.d(K9.LOG_TAG, "Account.getStats() on " + getDescription() + " took " + (endTime - startTime) + " ms;"
|
||||
+ " loading " + folders.size() + " took " + (folderLoadEnd - folderLoadStart) + " ms;"
|
||||
+ " evaluating took " + (folderEvalEnd - folderEvalStart) + " ms");
|
||||
+ " loading " + folders.size() + " took " + (folderLoadEnd - folderLoadStart) + " ms;"
|
||||
+ " evaluating took " + (folderEvalEnd - folderEvalStart) + " ms");
|
||||
return stats;
|
||||
}
|
||||
|
||||
|
||||
public void setChipColor(int color) {
|
||||
public void setChipColor(int color)
|
||||
{
|
||||
mChipColor = color;
|
||||
}
|
||||
|
||||
public int getChipColor() {
|
||||
public int getChipColor()
|
||||
{
|
||||
return mChipColor;
|
||||
}
|
||||
|
||||
@ -615,18 +617,18 @@ public class Account implements BaseAccount
|
||||
|
||||
|
||||
|
||||
/* Have we sent a new mail notification on this account */
|
||||
public boolean isRingNotified()
|
||||
{
|
||||
return mRingNotified;
|
||||
}
|
||||
/* Have we sent a new mail notification on this account */
|
||||
public boolean isRingNotified()
|
||||
{
|
||||
return mRingNotified;
|
||||
}
|
||||
|
||||
public void setRingNotified(boolean ringNotified)
|
||||
{
|
||||
mRingNotified = ringNotified;
|
||||
}
|
||||
public void setRingNotified(boolean ringNotified)
|
||||
{
|
||||
mRingNotified = ringNotified;
|
||||
}
|
||||
|
||||
public synchronized String getRingtone()
|
||||
public synchronized String getRingtone()
|
||||
{
|
||||
return mRingtoneUri;
|
||||
}
|
||||
|
@ -25,25 +25,30 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class ColorPickerDialog extends Dialog {
|
||||
public class ColorPickerDialog extends Dialog
|
||||
{
|
||||
|
||||
public interface OnColorChangedListener {
|
||||
public interface OnColorChangedListener
|
||||
{
|
||||
void colorChanged(int color);
|
||||
}
|
||||
|
||||
private OnColorChangedListener mListener;
|
||||
private int mInitialColor;
|
||||
|
||||
private static class ColorPickerView extends View {
|
||||
private static class ColorPickerView extends View
|
||||
{
|
||||
private Paint mPaint;
|
||||
private Paint mCenterPaint;
|
||||
private final int[] mColors;
|
||||
private OnColorChangedListener mListener;
|
||||
|
||||
ColorPickerView(Context c, OnColorChangedListener l, int color) {
|
||||
ColorPickerView(Context c, OnColorChangedListener l, int color)
|
||||
{
|
||||
super(c);
|
||||
mListener = l;
|
||||
mColors = new int[] {
|
||||
mColors = new int[]
|
||||
{
|
||||
0xFF800000, 0xFF800080, 0xFF000080, 0xFF008080, 0xFF008000,
|
||||
0xFF808000, 0xFF800000
|
||||
};
|
||||
@ -63,7 +68,8 @@ public class ColorPickerDialog extends Dialog {
|
||||
private boolean mHighlightCenter;
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
protected void onDraw(Canvas canvas)
|
||||
{
|
||||
float r = CENTER_X - mPaint.getStrokeWidth()*0.5f;
|
||||
|
||||
canvas.translate(CENTER_X, CENTER_X);
|
||||
@ -71,13 +77,17 @@ public class ColorPickerDialog extends Dialog {
|
||||
canvas.drawOval(new RectF(-r, -r, r, r), mPaint);
|
||||
canvas.drawCircle(0, 0, CENTER_RADIUS, mCenterPaint);
|
||||
|
||||
if (mTrackingCenter) {
|
||||
if (mTrackingCenter)
|
||||
{
|
||||
int c = mCenterPaint.getColor();
|
||||
mCenterPaint.setStyle(Paint.Style.STROKE);
|
||||
|
||||
if (mHighlightCenter) {
|
||||
if (mHighlightCenter)
|
||||
{
|
||||
mCenterPaint.setAlpha(0xFF);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
mCenterPaint.setAlpha(0x80);
|
||||
}
|
||||
canvas.drawCircle(0, 0,
|
||||
@ -90,7 +100,8 @@ public class ColorPickerDialog extends Dialog {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
|
||||
{
|
||||
setMeasuredDimension(CENTER_X*2, CENTER_Y*2);
|
||||
}
|
||||
|
||||
@ -98,28 +109,37 @@ public class ColorPickerDialog extends Dialog {
|
||||
private static final int CENTER_Y = 100;
|
||||
private static final int CENTER_RADIUS = 32;
|
||||
|
||||
private int floatToByte(float x) {
|
||||
private int floatToByte(float x)
|
||||
{
|
||||
int n = java.lang.Math.round(x);
|
||||
return n;
|
||||
}
|
||||
private int pinToByte(int n) {
|
||||
if (n < 0) {
|
||||
private int pinToByte(int n)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
n = 0;
|
||||
} else if (n > 255) {
|
||||
}
|
||||
else if (n > 255)
|
||||
{
|
||||
n = 255;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
private int ave(int s, int d, float p) {
|
||||
return s + java.lang.Math.round(p * (d - s));
|
||||
private int ave(int s, int d, float p)
|
||||
{
|
||||
return s + java.lang.Math.round(p *(d - s));
|
||||
}
|
||||
|
||||
private int interpColor(int colors[], float unit) {
|
||||
if (unit <= 0) {
|
||||
private int interpColor(int colors[], float unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
{
|
||||
return colors[0];
|
||||
}
|
||||
if (unit >= 1) {
|
||||
if (unit >= 1)
|
||||
{
|
||||
return colors[colors.length - 1];
|
||||
}
|
||||
|
||||
@ -138,7 +158,8 @@ public class ColorPickerDialog extends Dialog {
|
||||
return Color.argb(a, r, g, b);
|
||||
}
|
||||
|
||||
private int rotateColor(int color, float rad) {
|
||||
private int rotateColor(int color, float rad)
|
||||
{
|
||||
float deg = rad * 180 / 3.1415927f;
|
||||
int r = Color.red(color);
|
||||
int g = Color.green(color);
|
||||
@ -166,30 +187,38 @@ public class ColorPickerDialog extends Dialog {
|
||||
private static final float PI = 3.1415926f;
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
public boolean onTouchEvent(MotionEvent event)
|
||||
{
|
||||
float x = event.getX() - CENTER_X;
|
||||
float y = event.getY() - CENTER_Y;
|
||||
boolean inCenter = java.lang.Math.sqrt(x*x + y*y) <= CENTER_RADIUS;
|
||||
|
||||
switch (event.getAction()) {
|
||||
switch (event.getAction())
|
||||
{
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
mTrackingCenter = inCenter;
|
||||
if (inCenter) {
|
||||
if (inCenter)
|
||||
{
|
||||
mHighlightCenter = true;
|
||||
invalidate();
|
||||
break;
|
||||
}
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
if (mTrackingCenter) {
|
||||
if (mHighlightCenter != inCenter) {
|
||||
if (mTrackingCenter)
|
||||
{
|
||||
if (mHighlightCenter != inCenter)
|
||||
{
|
||||
mHighlightCenter = inCenter;
|
||||
invalidate();
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
float angle = (float)java.lang.Math.atan2(y, x);
|
||||
// need to turn angle [-PI ... PI] into unit [0....1]
|
||||
float unit = angle/(2*PI);
|
||||
if (unit < 0) {
|
||||
if (unit < 0)
|
||||
{
|
||||
unit += 1;
|
||||
}
|
||||
mCenterPaint.setColor(interpColor(mColors, unit));
|
||||
@ -197,8 +226,10 @@ public class ColorPickerDialog extends Dialog {
|
||||
}
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (mTrackingCenter) {
|
||||
if (inCenter) {
|
||||
if (mTrackingCenter)
|
||||
{
|
||||
if (inCenter)
|
||||
{
|
||||
mListener.colorChanged(mCenterPaint.getColor());
|
||||
}
|
||||
mTrackingCenter = false; // so we draw w/o halo
|
||||
@ -214,7 +245,8 @@ public class ColorPickerDialog extends Dialog {
|
||||
|
||||
public ColorPickerDialog(Context context,
|
||||
OnColorChangedListener listener,
|
||||
int initialColor) {
|
||||
int initialColor)
|
||||
{
|
||||
super(context);
|
||||
|
||||
mListener = listener;
|
||||
@ -222,10 +254,13 @@ public class ColorPickerDialog extends Dialog {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
OnColorChangedListener l = new OnColorChangedListener() {
|
||||
public void colorChanged(int color) {
|
||||
OnColorChangedListener l = new OnColorChangedListener()
|
||||
{
|
||||
public void colorChanged(int color)
|
||||
{
|
||||
mListener.colorChanged(color);
|
||||
dismiss();
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public abstract class EmailAddressAdapter extends ResourceCursorAdapter
|
||||
try
|
||||
{
|
||||
Class<? extends EmailAddressAdapter> clazz =
|
||||
Class.forName(className).asSubclass(EmailAddressAdapter.class);
|
||||
Class.forName(className).asSubclass(EmailAddressAdapter.class);
|
||||
sInstance = clazz.newInstance();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -34,7 +34,8 @@ public class EmailAddressAdapterSdk5 extends EmailAddressAdapter
|
||||
private static final String SORT_ORDER = Contacts.TIMES_CONTACTED
|
||||
+ " DESC, " + Contacts.DISPLAY_NAME;
|
||||
|
||||
private static final String[] PROJECTION = {
|
||||
private static final String[] PROJECTION =
|
||||
{
|
||||
Data._ID, // 0
|
||||
Contacts.DISPLAY_NAME, // 1
|
||||
Email.DATA // 2
|
||||
|
@ -325,12 +325,17 @@ public class FontSizes
|
||||
{
|
||||
switch (messageViewContent)
|
||||
{
|
||||
case SMALLEST: return 1;
|
||||
case SMALLER: return 2;
|
||||
case SMALLEST:
|
||||
return 1;
|
||||
case SMALLER:
|
||||
return 2;
|
||||
default:
|
||||
case NORMAL: return 3;
|
||||
case LARGER: return 4;
|
||||
case LARGEST: return 5;
|
||||
case NORMAL:
|
||||
return 3;
|
||||
case LARGER:
|
||||
return 4;
|
||||
case LARGEST:
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,11 +343,21 @@ public class FontSizes
|
||||
{
|
||||
switch (size)
|
||||
{
|
||||
case 1: messageViewContent = TextSize.SMALLEST; break;
|
||||
case 2: messageViewContent = TextSize.SMALLER; break;
|
||||
case 3: messageViewContent = TextSize.NORMAL; break;
|
||||
case 4: messageViewContent = TextSize.LARGER; break;
|
||||
case 5: messageViewContent = TextSize.LARGEST; break;
|
||||
case 1:
|
||||
messageViewContent = TextSize.SMALLEST;
|
||||
break;
|
||||
case 2:
|
||||
messageViewContent = TextSize.SMALLER;
|
||||
break;
|
||||
case 3:
|
||||
messageViewContent = TextSize.NORMAL;
|
||||
break;
|
||||
case 4:
|
||||
messageViewContent = TextSize.LARGER;
|
||||
break;
|
||||
case 5:
|
||||
messageViewContent = TextSize.LARGEST;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -497,12 +497,12 @@ public class K9 extends Application
|
||||
catch (NoSuchMethodException e)
|
||||
{
|
||||
Log.i(K9.LOG_TAG, "Can't get method " +
|
||||
classObject.toString() + "." + methodName);
|
||||
classObject.toString() + "." + methodName);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.e(K9.LOG_TAG, "Error while using reflection to get method " +
|
||||
classObject.toString() + "." + methodName, e);
|
||||
classObject.toString() + "." + methodName, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ public class MessagingController implements Runnable
|
||||
public void searchLocalMessages(SearchSpecification searchSpecification, final Message[] messages, final MessagingListener listener)
|
||||
{
|
||||
searchLocalMessages(searchSpecification.getAccountUuids(), searchSpecification.getFolderNames(), messages,
|
||||
searchSpecification.getQuery(), searchSpecification.isIntegrate(), searchSpecification.getRequiredFlags(), searchSpecification.getForbiddenFlags(), listener);
|
||||
searchSpecification.getQuery(), searchSpecification.isIntegrate(), searchSpecification.getRequiredFlags(), searchSpecification.getForbiddenFlags(), listener);
|
||||
}
|
||||
|
||||
|
||||
@ -717,19 +717,19 @@ public class MessagingController implements Runnable
|
||||
* @throws MessagingException
|
||||
*/
|
||||
public void searchLocalMessages(final String[] accountUuids, final String[] folderNames, final Message[] messages, final String query, final boolean integrate,
|
||||
final Flag[] requiredFlags, final Flag[] forbiddenFlags, final MessagingListener listener)
|
||||
final Flag[] requiredFlags, final Flag[] forbiddenFlags, final MessagingListener listener)
|
||||
{
|
||||
if (K9.DEBUG)
|
||||
{
|
||||
Log.i(K9.LOG_TAG, "searchLocalMessages ("
|
||||
+ "accountUuids=" + Utility.combine(accountUuids, ',')
|
||||
+ ", folderNames = " + Utility.combine(folderNames, ',')
|
||||
+ ", messages.size() = " + (messages != null ? messages.length : null)
|
||||
+ ", query = " + query
|
||||
+ ", integrate = " + integrate
|
||||
+ ", requiredFlags = " + Utility.combine(requiredFlags, ',')
|
||||
+ ", forbiddenFlags = " + Utility.combine(forbiddenFlags, ',')
|
||||
+ ")");
|
||||
+ "accountUuids=" + Utility.combine(accountUuids, ',')
|
||||
+ ", folderNames = " + Utility.combine(folderNames, ',')
|
||||
+ ", messages.size() = " + (messages != null ? messages.length : null)
|
||||
+ ", query = " + query
|
||||
+ ", integrate = " + integrate
|
||||
+ ", requiredFlags = " + Utility.combine(requiredFlags, ',')
|
||||
+ ", forbiddenFlags = " + Utility.combine(forbiddenFlags, ',')
|
||||
+ ")");
|
||||
}
|
||||
|
||||
threadPool.execute(new Runnable()
|
||||
@ -743,7 +743,7 @@ public class MessagingController implements Runnable
|
||||
{
|
||||
for (String accountUuid : accountUuids)
|
||||
{
|
||||
accountUuidsSet.add(accountUuid);
|
||||
accountUuidsSet.add(accountUuid);
|
||||
}
|
||||
}
|
||||
final Preferences prefs = Preferences.getPreferences(mApplication.getApplicationContext());
|
||||
@ -818,11 +818,11 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
}
|
||||
else if (noSpecialFolders && (
|
||||
localFolderName.equals(account.getTrashFolderName()) ||
|
||||
localFolderName.equals(account.getOutboxFolderName()) ||
|
||||
localFolderName.equals(account.getDraftsFolderName()) ||
|
||||
localFolderName.equals(account.getSentFolderName()) ||
|
||||
localFolderName.equals(account.getErrorFolderName())))
|
||||
localFolderName.equals(account.getTrashFolderName()) ||
|
||||
localFolderName.equals(account.getOutboxFolderName()) ||
|
||||
localFolderName.equals(account.getDraftsFolderName()) ||
|
||||
localFolderName.equals(account.getSentFolderName()) ||
|
||||
localFolderName.equals(account.getErrorFolderName())))
|
||||
{
|
||||
include = false;
|
||||
}
|
||||
@ -2723,7 +2723,7 @@ public class MessagingController implements Runnable
|
||||
{
|
||||
@Override
|
||||
public void act(final Account account, final Folder folder,
|
||||
final List<Message> messages)
|
||||
final List<Message> messages)
|
||||
{
|
||||
String[] uids = new String[messages.size()];
|
||||
for (int i = 0; i < messages.size(); i++)
|
||||
@ -2766,7 +2766,7 @@ public class MessagingController implements Runnable
|
||||
Message msg = localFolder.getMessage(uid);
|
||||
if (msg != null)
|
||||
{
|
||||
messages.add(msg);
|
||||
messages.add(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3465,7 +3465,7 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
|
||||
public void getAccountStats(final Context context, final Account account,
|
||||
final MessagingListener l)
|
||||
final MessagingListener l)
|
||||
{
|
||||
Runnable unreadRunnable = new Runnable()
|
||||
{
|
||||
@ -3562,7 +3562,7 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
}
|
||||
public void moveMessages(final Account account, final String srcFolder, final Message[] messages, final String destFolder,
|
||||
final MessagingListener listener)
|
||||
final MessagingListener listener)
|
||||
{
|
||||
for (Message message : messages)
|
||||
{
|
||||
@ -3578,13 +3578,13 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
|
||||
public void moveMessage(final Account account, final String srcFolder, final Message message, final String destFolder,
|
||||
final MessagingListener listener)
|
||||
final MessagingListener listener)
|
||||
{
|
||||
moveMessages(account, srcFolder, new Message[] { message }, destFolder, listener);
|
||||
}
|
||||
|
||||
public void copyMessages(final Account account, final String srcFolder, final Message[] messages, final String destFolder,
|
||||
final MessagingListener listener)
|
||||
final MessagingListener listener)
|
||||
{
|
||||
putBackground("copyMessages", null, new Runnable()
|
||||
{
|
||||
@ -3595,7 +3595,7 @@ public class MessagingController implements Runnable
|
||||
});
|
||||
}
|
||||
public void copyMessage(final Account account, final String srcFolder, final Message message, final String destFolder,
|
||||
final MessagingListener listener)
|
||||
final MessagingListener listener)
|
||||
{
|
||||
copyMessages(account, srcFolder, new Message[] { message }, destFolder, listener);
|
||||
}
|
||||
@ -3722,7 +3722,7 @@ public class MessagingController implements Runnable
|
||||
|
||||
@Override
|
||||
public void act(final Account account, final Folder folder,
|
||||
final List<Message> messages)
|
||||
final List<Message> messages)
|
||||
{
|
||||
for (Message message : messages)
|
||||
{
|
||||
@ -4234,11 +4234,11 @@ public class MessagingController implements Runnable
|
||||
public void run()
|
||||
{
|
||||
if (K9.DEBUG)
|
||||
Log.v(K9.LOG_TAG, "Clearing notification flag for " + account.getDescription());
|
||||
Log.v(K9.LOG_TAG, "Clearing notification flag for " + account.getDescription());
|
||||
account.setRingNotified(false);
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,13 +84,13 @@ public class MessagingControllerPushReceiver implements PushReceiver
|
||||
controller.synchronizeMailbox(account, folder.getName(), new MessagingListener()
|
||||
{
|
||||
public void synchronizeMailboxFinished(Account account, String folder,
|
||||
int totalMessagesInMailbox, int numNewMessages)
|
||||
int totalMessagesInMailbox, int numNewMessages)
|
||||
{
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
public void synchronizeMailboxFailed(Account account, String folder,
|
||||
String message)
|
||||
String message)
|
||||
{
|
||||
latch.countDown();
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
@Override
|
||||
public void onCreate(Bundle icicle)
|
||||
{
|
||||
unreadAccount = new SearchAccount(this, false, null, null );
|
||||
unreadAccount = new SearchAccount(this, false, null, null);
|
||||
unreadAccount.setDescription(getString(R.string.search_all_messages_title));
|
||||
unreadAccount.setEmail(getString(R.string.search_all_messages_detail));
|
||||
|
||||
@ -843,7 +843,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
}
|
||||
else
|
||||
@ -918,7 +918,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
|
||||
final BaseAccount account;
|
||||
final SearchModifier searchModifier;
|
||||
AccountClickListener(BaseAccount nAccount, SearchModifier nSearchModifier )
|
||||
AccountClickListener(BaseAccount nAccount, SearchModifier nSearchModifier)
|
||||
{
|
||||
account = nAccount;
|
||||
searchModifier = nSearchModifier;
|
||||
@ -932,9 +932,9 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
SearchAccount searchAccount = (SearchAccount)account;
|
||||
|
||||
MessageList.actionHandle(Accounts.this,
|
||||
description, "", searchAccount.isIntegrate(),
|
||||
combine(searchAccount.getRequiredFlags(), searchModifier.requiredFlags),
|
||||
combine(searchAccount.getForbiddenFlags(), searchModifier.forbiddenFlags));
|
||||
description, "", searchAccount.isIntegrate(),
|
||||
combine(searchAccount.getRequiredFlags(), searchModifier.requiredFlags),
|
||||
combine(searchAccount.getForbiddenFlags(), searchModifier.forbiddenFlags));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -74,7 +74,8 @@ public class EditIdentity extends K9Activity
|
||||
mSignatureUse = (CheckBox)findViewById(R.id.signature_use);
|
||||
mSignatureView = (EditText)findViewById(R.id.signature);
|
||||
mSignatureUse.setChecked(mIdentity.getSignatureUse());
|
||||
mSignatureUse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
mSignatureUse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
|
||||
{
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
if (isChecked)
|
||||
|
@ -79,7 +79,7 @@ public class FolderList extends K9ListActivity
|
||||
public void run()
|
||||
{
|
||||
String dispString = mAdapter.mListener.formatHeader(FolderList.this,
|
||||
getString(R.string.folder_list_title, mAccount.getDescription()), mUnreadMessageCount, getTimeFormat());
|
||||
getString(R.string.folder_list_title, mAccount.getDescription()), mUnreadMessageCount, getTimeFormat());
|
||||
|
||||
|
||||
setTitle(dispString);
|
||||
@ -1253,7 +1253,7 @@ public class FolderList extends K9ListActivity
|
||||
if (K9.messageListStars() && folder.flaggedMessageCount > 0)
|
||||
{
|
||||
holder.flaggedMessageCount.setText(Integer
|
||||
.toString(folder.flaggedMessageCount));
|
||||
.toString(folder.flaggedMessageCount));
|
||||
holder.flaggedMessageCount.setOnClickListener(new FolderClickListener(mAccount, folder.name, folder.displayName, SearchModifier.FLAGGED));
|
||||
holder.flaggedMessageCount.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -1269,7 +1269,7 @@ public class FolderList extends K9ListActivity
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
holder.chip.setBackgroundColor(mAccount.getChipColor());
|
||||
holder.chip.getBackground().setAlpha(folder.unreadMessageCount == 0 ? 127 : 255);
|
||||
@ -1364,7 +1364,7 @@ public class FolderList extends K9ListActivity
|
||||
try
|
||||
{
|
||||
folder.open(Folder.OpenMode.READ_WRITE);
|
||||
// unreadCount = folder.getUnreadMessageCount();
|
||||
// unreadCount = folder.getUnreadMessageCount();
|
||||
}
|
||||
catch (MessagingException me)
|
||||
{
|
||||
@ -1446,7 +1446,7 @@ public class FolderList extends K9ListActivity
|
||||
final String folderName;
|
||||
final String displayName;
|
||||
final SearchModifier searchModifier;
|
||||
FolderClickListener(BaseAccount nAccount, String folderName, String displayName, SearchModifier nSearchModifier )
|
||||
FolderClickListener(BaseAccount nAccount, String folderName, String displayName, SearchModifier nSearchModifier)
|
||||
{
|
||||
account = nAccount;
|
||||
this.folderName = folderName;
|
||||
@ -1457,8 +1457,8 @@ public class FolderList extends K9ListActivity
|
||||
public void onClick(View v)
|
||||
{
|
||||
String description = getString(R.string.search_title,
|
||||
getString(R.string.message_list_title, account.getDescription(), displayName),
|
||||
getString(searchModifier.resId));
|
||||
getString(R.string.message_list_title, account.getDescription(), displayName),
|
||||
getString(searchModifier.resId));
|
||||
|
||||
SearchSpecification searchSpec = new SearchSpecification()
|
||||
{
|
||||
|
@ -980,11 +980,13 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
File f = new File(uriString.substring("file://".length()));
|
||||
attachment.size = f.length();
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Log.v(K9.LOG_TAG, "Not a file: " + uriString);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Log.v(K9.LOG_TAG, "old attachment.size: " + attachment.size);
|
||||
}
|
||||
Log.v(K9.LOG_TAG, "new attachment.size: " + attachment.size);
|
||||
@ -1591,7 +1593,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
}
|
||||
|
||||
private String decode(String s)
|
||||
throws UnsupportedEncodingException
|
||||
throws UnsupportedEncodingException
|
||||
{
|
||||
return URLDecoder.decode(s, "UTF-8");
|
||||
}
|
||||
@ -1602,7 +1604,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
*
|
||||
* @mailToString the href (which must start with "mailto:").
|
||||
*/
|
||||
private void initializeFromMailTo(String mailToString) {
|
||||
private void initializeFromMailTo(String mailToString)
|
||||
{
|
||||
|
||||
// Chop up everything between mailto: and ? to find recipients
|
||||
int index = mailToString.indexOf("?");
|
||||
|
@ -67,7 +67,7 @@ public class MessageList
|
||||
private static final String EXTRA_QUERY_FLAGS = "queryFlags";
|
||||
private static final String EXTRA_FORBIDDEN_FLAGS = "forbiddenFlags";
|
||||
private static final String EXTRA_INTEGRATE = "integrate";
|
||||
private static final String EXTRA_ACCOUNT_UUIDS = "accountUuids";
|
||||
private static final String EXTRA_ACCOUNT_UUIDS = "accountUuids";
|
||||
private static final String EXTRA_FOLDER_NAMES = "folderNames";
|
||||
private static final String EXTRA_TITLE = "title";
|
||||
|
||||
@ -498,7 +498,7 @@ public class MessageList
|
||||
|
||||
}
|
||||
|
||||
private void initializeLayout ()
|
||||
private void initializeLayout()
|
||||
{
|
||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
||||
|
@ -26,9 +26,9 @@ public class MessageReference implements Serializable
|
||||
public String toString()
|
||||
{
|
||||
return "MessageReference{accountUuid = '" +
|
||||
accountUuid
|
||||
+ "', folderName = '" + folderName
|
||||
+ "', uid = '" + uid
|
||||
+ "'}";
|
||||
accountUuid
|
||||
+ "', folderName = '" + folderName
|
||||
+ "', uid = '" + uid
|
||||
+ "'}";
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
mTimeView.setText(time);
|
||||
mToView.setText(to);
|
||||
|
||||
mCcContainerView.setVisibility((cc != null && cc.length() > 0 )? View.VISIBLE : View.GONE);
|
||||
mCcContainerView.setVisibility((cc != null && cc.length() > 0)? View.VISIBLE : View.GONE);
|
||||
|
||||
mCcView.setText(cc);
|
||||
mAttachmentIcon.setVisibility(hasAttachments ? View.VISIBLE : View.GONE);
|
||||
@ -1355,7 +1355,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
|
||||
MessageView.this.mMessage = message;
|
||||
if (!message.isSet(Flag.X_DOWNLOADED_FULL)
|
||||
&& !message.isSet(Flag.X_DOWNLOADED_PARTIAL))
|
||||
&& !message.isSet(Flag.X_DOWNLOADED_PARTIAL))
|
||||
{
|
||||
mHandler.post(new Runnable()
|
||||
{
|
||||
@ -1388,8 +1388,8 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
try
|
||||
{
|
||||
if (MessageView.this.mMessage!=null
|
||||
&& MessageView.this.mMessage.isSet(Flag.X_DOWNLOADED_PARTIAL)
|
||||
&& message.isSet(Flag.X_DOWNLOADED_FULL))
|
||||
&& MessageView.this.mMessage.isSet(Flag.X_DOWNLOADED_PARTIAL)
|
||||
&& message.isSet(Flag.X_DOWNLOADED_FULL))
|
||||
{
|
||||
|
||||
setHeaders(account, folder, uid, message);
|
||||
|
@ -8,7 +8,7 @@ import com.fsck.k9.mail.Flag;
|
||||
|
||||
enum SearchModifier
|
||||
{
|
||||
FLAGGED(R.string.flagged_modifier, new Flag[] { Flag.FLAGGED}, null), UNREAD(R.string.unread_modifier, null, new Flag[] { Flag.SEEN} );
|
||||
FLAGGED(R.string.flagged_modifier, new Flag[] { Flag.FLAGGED}, null), UNREAD(R.string.unread_modifier, null, new Flag[] { Flag.SEEN});
|
||||
|
||||
final int resId;
|
||||
final Flag[] requiredFlags;
|
||||
|
@ -325,7 +325,8 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
mAutoExpandFolder.setSummary(translateFolder(mAccount.getAutoExpandFolderName()));
|
||||
|
||||
mAutoExpandFolder.setOnPreferenceClickListener(
|
||||
new Preference.OnPreferenceClickListener() {
|
||||
new Preference.OnPreferenceClickListener()
|
||||
{
|
||||
public boolean onPreferenceClick(Preference preference)
|
||||
{
|
||||
onChooseAutoExpandFolder();
|
||||
@ -338,13 +339,14 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
mChipColor = (Preference)findPreference(PREFERENCE_CHIP_COLOR);
|
||||
|
||||
mChipColor.setOnPreferenceClickListener(
|
||||
new Preference.OnPreferenceClickListener() {
|
||||
new Preference.OnPreferenceClickListener()
|
||||
{
|
||||
public boolean onPreferenceClick(Preference preference)
|
||||
{
|
||||
onChooseChipColor();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@ -509,9 +511,14 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
|
||||
public void onChooseChipColor()
|
||||
{
|
||||
new ColorPickerDialog(this, new ColorPickerDialog.OnColorChangedListener () {
|
||||
public void colorChanged (int color) { mAccount.setChipColor(color); } },
|
||||
mAccount.getChipColor()).show();
|
||||
new ColorPickerDialog(this, new ColorPickerDialog.OnColorChangedListener()
|
||||
{
|
||||
public void colorChanged(int color)
|
||||
{
|
||||
mAccount.setChipColor(color);
|
||||
}
|
||||
},
|
||||
mAccount.getChipColor()).show();
|
||||
}
|
||||
|
||||
public void onChooseAutoExpandFolder()
|
||||
|
@ -69,25 +69,26 @@ public class AccountSetupComposition extends K9Activity
|
||||
mAccountAlwaysBcc = (EditText)findViewById(R.id.account_always_bcc);
|
||||
mAccountAlwaysBcc.setText(mAccount.getAlwaysBcc());
|
||||
|
||||
mAccountSignatureLayout = (LinearLayout)findViewById(R.id.account_signature_layout);
|
||||
mAccountSignatureLayout = (LinearLayout)findViewById(R.id.account_signature_layout);
|
||||
|
||||
mAccountSignatureUse = (CheckBox)findViewById(R.id.account_signature_use);
|
||||
mAccountSignatureUse = (CheckBox)findViewById(R.id.account_signature_use);
|
||||
boolean useSignature = mAccount.getSignatureUse();
|
||||
mAccountSignatureUse.setChecked(useSignature);
|
||||
mAccountSignatureUse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
mAccountSignatureUse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
|
||||
{
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
if (isChecked)
|
||||
{
|
||||
mAccountSignatureLayout.setVisibility(View.VISIBLE);
|
||||
mAccountSignature.setText(mAccount.getSignature());
|
||||
boolean isSignatureBeforeQuotedText = mAccount.isSignatureBeforeQuotedText();
|
||||
mAccountSignatureBeforeLocation.setChecked(isSignatureBeforeQuotedText);
|
||||
mAccountSignatureAfterLocation.setChecked(!isSignatureBeforeQuotedText);
|
||||
mAccountSignatureLayout.setVisibility(View.VISIBLE);
|
||||
mAccountSignature.setText(mAccount.getSignature());
|
||||
boolean isSignatureBeforeQuotedText = mAccount.isSignatureBeforeQuotedText();
|
||||
mAccountSignatureBeforeLocation.setChecked(isSignatureBeforeQuotedText);
|
||||
mAccountSignatureAfterLocation.setChecked(!isSignatureBeforeQuotedText);
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccountSignatureLayout.setVisibility(View.GONE);
|
||||
mAccountSignatureLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -107,7 +108,7 @@ public class AccountSetupComposition extends K9Activity
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccountSignatureLayout.setVisibility(View.GONE);
|
||||
mAccountSignatureLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,9 +127,9 @@ public class AccountSetupComposition extends K9Activity
|
||||
mAccount.setSignatureUse(mAccountSignatureUse.isChecked());
|
||||
if (mAccountSignatureUse.isChecked())
|
||||
{
|
||||
mAccount.setSignature(mAccountSignature.getText().toString());
|
||||
boolean isSignatureBeforeQuotedText = mAccountSignatureBeforeLocation.isChecked();
|
||||
mAccount.setSignatureBeforeQuotedText(isSignatureBeforeQuotedText);
|
||||
mAccount.setSignature(mAccountSignature.getText().toString());
|
||||
boolean isSignatureBeforeQuotedText = mAccountSignatureBeforeLocation.isChecked();
|
||||
mAccount.setSignatureBeforeQuotedText(isSignatureBeforeQuotedText);
|
||||
}
|
||||
|
||||
mAccount.save(Preferences.getPreferences(this));
|
||||
|
@ -82,13 +82,13 @@ public class Prefs extends K9PreferenceActivity
|
||||
|
||||
findPreference(PREFERENCE_FONT_SIZE).setOnPreferenceClickListener(
|
||||
new Preference.OnPreferenceClickListener()
|
||||
{
|
||||
public boolean onPreferenceClick(Preference preference)
|
||||
{
|
||||
public boolean onPreferenceClick(Preference preference)
|
||||
{
|
||||
onFontSizeSettings();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
onFontSizeSettings();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
mDateFormat = (ListPreference) findPreference(PREFERENCE_DATE_FORMAT);
|
||||
String[] formats = DateFormatter.getFormats(this);
|
||||
|
@ -59,24 +59,24 @@ public abstract class Multipart implements Body
|
||||
this.mParent = parent;
|
||||
}
|
||||
|
||||
public void setEncoding(String encoding)
|
||||
{
|
||||
for (BodyPart part : mParts)
|
||||
{
|
||||
try
|
||||
{
|
||||
Body body = part.getBody();
|
||||
if (body instanceof TextBody)
|
||||
{
|
||||
part.setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, encoding);
|
||||
((TextBody)body).setEncoding(encoding);
|
||||
}
|
||||
}
|
||||
catch (MessagingException e)
|
||||
{
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
public void setEncoding(String encoding)
|
||||
{
|
||||
for (BodyPart part : mParts)
|
||||
{
|
||||
try
|
||||
{
|
||||
Body body = part.getBody();
|
||||
if (body instanceof TextBody)
|
||||
{
|
||||
part.setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, encoding);
|
||||
((TextBody)body).setEncoding(encoding);
|
||||
}
|
||||
}
|
||||
catch (MessagingException e)
|
||||
{
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -457,11 +457,11 @@ public class MimeMessage extends Message
|
||||
@Override
|
||||
public void setEncoding(String encoding)
|
||||
{
|
||||
if (mBody instanceof Multipart)
|
||||
{
|
||||
((Multipart)mBody).setEncoding(encoding);
|
||||
}
|
||||
else if (mBody instanceof TextBody)
|
||||
if (mBody instanceof Multipart)
|
||||
{
|
||||
((Multipart)mBody).setEncoding(encoding);
|
||||
}
|
||||
else if (mBody instanceof TextBody)
|
||||
{
|
||||
setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, encoding);
|
||||
((TextBody)mBody).setEncoding(encoding);
|
||||
|
@ -71,6 +71,6 @@ public class TextBody implements Body
|
||||
|
||||
public void setEncoding(String encoding)
|
||||
{
|
||||
mEncoding = encoding;
|
||||
mEncoding = encoding;
|
||||
}
|
||||
}
|
||||
|
@ -1274,7 +1274,7 @@ public class ImapStore extends Store
|
||||
if (part != null)
|
||||
{
|
||||
String contentTransferEncoding = part.getHeader(
|
||||
MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0];
|
||||
MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0];
|
||||
part.setBody(MimeUtility.decodeBody(bodyStream, contentTransferEncoding));
|
||||
}
|
||||
else
|
||||
@ -2685,7 +2685,7 @@ public class ImapStore extends Store
|
||||
newUidNext = highestUid + 1;
|
||||
if (K9.DEBUG)
|
||||
Log.i(K9.LOG_TAG, "highest UID = " + highestUid
|
||||
+ ", set newUidNext to " + newUidNext);
|
||||
+ ", set newUidNext to " + newUidNext);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ public class LocalStore extends Store implements Serializable
|
||||
}
|
||||
|
||||
public Message[] searchForMessages(MessageRetrievalListener listener, String queryString,
|
||||
List<LocalFolder> folders, Message[] messages, final Flag[] requiredFlags, final Flag[] forbiddenFlags) throws MessagingException
|
||||
List<LocalFolder> folders, Message[] messages, final Flag[] requiredFlags, final Flag[] forbiddenFlags) throws MessagingException
|
||||
{
|
||||
List<String> args = new LinkedList<String>();
|
||||
|
||||
@ -1222,7 +1222,7 @@ public class LocalStore extends Store implements Serializable
|
||||
{
|
||||
String id = getPrefId();
|
||||
return FolderClass.valueOf(preferences.getPreferences().getString(id + ".displayMode",
|
||||
FolderClass.NO_CLASS.name()));
|
||||
FolderClass.NO_CLASS.name()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1628,7 +1628,7 @@ public class WebDavStore extends Store
|
||||
statusCode > 300)
|
||||
{
|
||||
throw new IOException("Error during with code " + statusCode + " during fetch: "
|
||||
+ response.getStatusLine().toString());
|
||||
+ response.getStatusLine().toString());
|
||||
}
|
||||
|
||||
if (entity != null)
|
||||
@ -1985,7 +1985,7 @@ public class WebDavStore extends Store
|
||||
}
|
||||
open(OpenMode.READ_WRITE);
|
||||
EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream(
|
||||
new BufferedOutputStream(out, 1024));
|
||||
new BufferedOutputStream(out, 1024));
|
||||
message.writeTo(msgOut);
|
||||
msgOut.flush();
|
||||
|
||||
@ -2019,8 +2019,8 @@ public class WebDavStore extends Store
|
||||
statusCode > 300)
|
||||
{
|
||||
throw new IOException("Error with status code " + statusCode
|
||||
+ " while sending/appending message. Response = "
|
||||
+ response.getStatusLine().toString() + " for message " + messageURL);
|
||||
+ " while sending/appending message. Response = "
|
||||
+ response.getStatusLine().toString() + " for message " + messageURL);
|
||||
}
|
||||
WebDavMessage retMessage = new WebDavMessage(message.getUid(), this);
|
||||
|
||||
|
@ -300,7 +300,7 @@ public class SmtpTransport extends Transport
|
||||
boolean possibleSend = false;
|
||||
try
|
||||
{
|
||||
//TODO: Add BODY=8BITMIME parameter if appropriate?
|
||||
//TODO: Add BODY=8BITMIME parameter if appropriate?
|
||||
executeSimpleCommand("MAIL FROM: " + "<" + from[0].getAddress() + ">");
|
||||
for (Address address : message.getRecipients(RecipientType.TO))
|
||||
{
|
||||
@ -318,10 +318,10 @@ public class SmtpTransport extends Transport
|
||||
executeSimpleCommand("DATA");
|
||||
|
||||
EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream(
|
||||
new SmtpDataStuffing(
|
||||
new LineWrapOutputStream(
|
||||
new BufferedOutputStream(mOut, 1024),
|
||||
1000)));
|
||||
new SmtpDataStuffing(
|
||||
new LineWrapOutputStream(
|
||||
new BufferedOutputStream(mOut, 1024),
|
||||
1000)));
|
||||
|
||||
message.writeTo(msgOut);
|
||||
|
||||
|
@ -421,13 +421,13 @@ public class Storage implements SharedPreferences
|
||||
try
|
||||
{
|
||||
cursor = mDb.query(
|
||||
"preferences_storage",
|
||||
new String[] {"value"},
|
||||
"primkey = ?",
|
||||
new String[] {key},
|
||||
null,
|
||||
null,
|
||||
null);
|
||||
"preferences_storage",
|
||||
new String[] {"value"},
|
||||
"primkey = ?",
|
||||
new String[] {key},
|
||||
null,
|
||||
null,
|
||||
null);
|
||||
|
||||
if (cursor.moveToNext())
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ public class AttachmentProvider extends ContentProvider
|
||||
}
|
||||
|
||||
private File getFile(String dbName, String id)
|
||||
throws FileNotFoundException
|
||||
throws FileNotFoundException
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -166,7 +166,8 @@ public class AttachmentProvider extends ContentProvider
|
||||
if (!file.exists())
|
||||
{
|
||||
file = new File("/sdcard" + attachmentsDir.getCanonicalPath().substring("/data".length()), id);
|
||||
if (!file.exists()) {
|
||||
if (!file.exists())
|
||||
{
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public abstract class CoreService extends Service
|
||||
if (threadPool == null)
|
||||
{
|
||||
Log.e(K9.LOG_TAG, "CoreService.execute (" + className + ") called with no threadPool available; running Runnable " + runner.hashCode() + " in calling thread", new Throwable());
|
||||
synchronized(this)
|
||||
synchronized (this)
|
||||
{
|
||||
myRunner.run();
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ public class MailService extends CoreService
|
||||
startIdObj = null;
|
||||
}
|
||||
}
|
||||
else if (CONNECTIVITY_CHANGE.equals(intent.getAction()) )
|
||||
else if (CONNECTIVITY_CHANGE.equals(intent.getAction()))
|
||||
{
|
||||
notifyConnectionStatus(hasConnectivity);
|
||||
rescheduleAll(hasConnectivity, doBackground, startIdObj);
|
||||
@ -328,10 +328,10 @@ public class MailService extends CoreService
|
||||
long nextTime = base + delay;
|
||||
if (K9.DEBUG)
|
||||
Log.i(K9.LOG_TAG,
|
||||
"previousInterval = " + previousInterval
|
||||
+ ", shortestInterval = " + shortestInterval
|
||||
+ ", lastCheckEnd = " + new Date(lastCheckEnd)
|
||||
+ ", considerLastCheckEnd = " + considerLastCheckEnd);
|
||||
"previousInterval = " + previousInterval
|
||||
+ ", shortestInterval = " + shortestInterval
|
||||
+ ", lastCheckEnd = " + new Date(lastCheckEnd)
|
||||
+ ", considerLastCheckEnd = " + considerLastCheckEnd);
|
||||
nextCheck = nextTime;
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user