ProcessPendingMessagesAction works based on subscriptions

PorcessPendingMessagesAction queues one message for sending/downloading
associated with a subscription triggering current action at a time. And
the ConnectivityUtil also works based on subscriptions so that pending
messages can be processed regardless of other phones' state in multi-sim
case.

It includes cleanup code as well.

Test: Manual

Change-Id: Id6b4f4a0aa6a3291e7a4d8a5d3f0fbb9db3c5b86
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
Taesu Lee
2020-02-28 18:16:54 +09:00
parent 4e84ad49bb
commit 4e99cc0a02
21 changed files with 274 additions and 464 deletions
@@ -28,7 +28,6 @@ import androidx.core.app.JobIntentService;
import com.android.messaging.Factory;
import com.android.messaging.datamodel.DataModel;
import com.android.messaging.util.ConnectivityUtil;
import com.android.messaging.util.LogUtil;
import com.android.messaging.util.LoggingTimer;
import com.google.common.annotations.VisibleForTesting;
@@ -134,7 +133,6 @@ public class ActionServiceImpl extends JobIntentService {
protected static final String BUNDLE_ACTION = "bundle_action";
private BackgroundWorker mBackgroundWorker;
private ConnectivityUtil mConnectivityUtil;
/**
* Allocate an intent with a specific opcode.
@@ -213,14 +211,11 @@ public class ActionServiceImpl extends JobIntentService {
public void onCreate() {
super.onCreate();
mBackgroundWorker = DataModel.get().getBackgroundWorkerForActionService();
mConnectivityUtil = DataModel.get().getConnectivityUtil();
mConnectivityUtil.registerForSignalStrength();
}
@Override
public void onDestroy() {
super.onDestroy();
mConnectivityUtil.unregisterForSignalStrength();
}
/**