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-17 15:15:17 +09:00
parent 4e84ad49bb
commit 4e99cc0a02
21 changed files with 274 additions and 464 deletions

View File

@@ -27,8 +27,6 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.media.MediaMetadataRetriever;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
@@ -2661,26 +2659,6 @@ public class MmsUtils {
return stringResId;
}
/**
* The absence of a connection type.
*/
public static final int TYPE_NONE = -1;
public static int getConnectivityEventNetworkType(final Context context, final Intent intent) {
final ConnectivityManager connMgr = (ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE);
if (OsUtil.isAtLeastJB_MR1()) {
return intent.getIntExtra(ConnectivityManager.EXTRA_NETWORK_TYPE, TYPE_NONE);
} else {
final NetworkInfo info = (NetworkInfo) intent.getParcelableExtra(
ConnectivityManager.EXTRA_NETWORK_INFO);
if (info != null) {
return info.getType();
}
}
return TYPE_NONE;
}
/**
* Dump the raw MMS data into a file
*