Bug 1062112: Part 1h: Remove redundant keywords from GeckoSmsManager. r=nalexander

This commit is contained in:
Chris Kitching 2014-09-04 18:43:09 -07:00
Родитель 8b3e370e99
Коммит 2ab2a10542
2 изменённых файлов: 18 добавлений и 20 удалений

Просмотреть файл

@ -66,7 +66,7 @@ class Envelope
mMessageId = -1;
mError = GeckoSmsManager.kNoError;
int size = Envelope.SubParts.values().length;
int size = SubParts.values().length;
mRemainingParts = new int[size];
mFailing = new boolean[size];
@ -76,7 +76,7 @@ class Envelope
}
}
public void decreaseRemainingParts(Envelope.SubParts aType) {
public void decreaseRemainingParts(SubParts aType) {
--mRemainingParts[aType.ordinal()];
if (mRemainingParts[SubParts.SENT_PART.ordinal()] >
@ -85,15 +85,15 @@ class Envelope
}
}
public boolean arePartsRemaining(Envelope.SubParts aType) {
public boolean arePartsRemaining(SubParts aType) {
return mRemainingParts[aType.ordinal()] != 0;
}
public void markAsFailed(Envelope.SubParts aType) {
public void markAsFailed(SubParts aType) {
mFailing[aType.ordinal()] = true;
}
public boolean isFailing(Envelope.SubParts aType) {
public boolean isFailing(SubParts aType) {
return mFailing[aType.ordinal()];
}
@ -345,7 +345,7 @@ public class GeckoSmsManager
private final static int kMessageClassClass2 = 3;
private final static int kMessageClassClass3 = 4;
private final static String[] kRequiredMessageRows = new String[] { "_id", "address", "body", "date", "type", "status" };
private final static String[] kRequiredMessageRows = { "_id", "address", "body", "date", "type", "status" };
// Used to generate monotonically increasing GUIDs.
private static final AtomicInteger pendingIntentGuid = new AtomicInteger(Integer.MIN_VALUE);
@ -360,9 +360,9 @@ public class GeckoSmsManager
@Override
public void start() {
IntentFilter smsFilter = new IntentFilter();
smsFilter.addAction(GeckoSmsManager.ACTION_SMS_RECEIVED);
smsFilter.addAction(GeckoSmsManager.ACTION_SMS_SENT);
smsFilter.addAction(GeckoSmsManager.ACTION_SMS_DELIVERED);
smsFilter.addAction(ACTION_SMS_RECEIVED);
smsFilter.addAction(ACTION_SMS_SENT);
smsFilter.addAction(ACTION_SMS_DELIVERED);
GeckoAppShell.getContext().registerReceiver(this, smsFilter);
}
@ -486,8 +486,6 @@ public class GeckoSmsManager
!envelope.arePartsRemaining(Envelope.SubParts.DELIVERED_PART)) {
postman.destroyEnvelope(envelopeId);
}
return;
}
}

Просмотреть файл

@ -24,16 +24,16 @@ public class SmsManager {
}
public interface ISmsManager {
public void start();
public void stop();
public void shutdown();
void start();
void stop();
void shutdown();
public void send(String aNumber, String aMessage, int aRequestId);
public void getMessage(int aMessageId, int aRequestId);
public void deleteMessage(int aMessageId, int aRequestId);
public void createMessageList(long aStartDate, long aEndDate, String[] aNumbers, int aNumbersCount, String aDelivery, boolean aHasRead, boolean aRead, long aThreadId, boolean aReverse, int aRequestId);
public void getNextMessageInList(int aListId, int aRequestId);
public void clearMessageList(int aListId);
void send(String aNumber, String aMessage, int aRequestId);
void getMessage(int aMessageId, int aRequestId);
void deleteMessage(int aMessageId, int aRequestId);
void createMessageList(long aStartDate, long aEndDate, String[] aNumbers, int aNumbersCount, String aDelivery, boolean aHasRead, boolean aRead, long aThreadId, boolean aReverse, int aRequestId);
void getNextMessageInList(int aListId, int aRequestId);
void clearMessageList(int aListId);
}
}