Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e342fa3 authored by Tom Taylor's avatar Tom Taylor
Browse files

Remove MMS from the framework

The MMS code has been moved into the mms-common library.
Move SqliteWrapper (and make it hidden) into the database
directory because Telephony.java depends on it. Create a mmscommon
library similar to androidcommon for a number of files used both
by the telephony layer, by mms, and by myfaves.

Change-Id: I2e23e87c4961b87c42a4c8a63f812fa9e0e44dec
parent 1f40f174
Loading
Loading
Loading
Loading
+5 −17
Original line number Diff line number Diff line
@@ -15,9 +15,8 @@
 * limitations under the License.
 */

package com.google.android.mms.util;
package android.database.sqlite;

import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
@@ -27,6 +26,10 @@ import android.net.Uri;
import android.util.Log;
import android.widget.Toast;

/**
 * @hide
 */

public final class SqliteWrapper {
    private static final String TAG = "SqliteWrapper";
    private static final String SQLITE_EXCEPTION_DETAIL_MESSAGE
@@ -36,21 +39,6 @@ public final class SqliteWrapper {
        // Forbidden being instantiated.
    }

    // FIXME: It looks like outInfo.lowMemory does not work well as we expected.
    // after run command: adb shell fillup -p 100, outInfo.lowMemory is still false.
    private static boolean isLowMemory(Context context) {
        if (null == context) {
            return false;
        }

        ActivityManager am = (ActivityManager)
                        context.getSystemService(Context.ACTIVITY_SERVICE);
        ActivityManager.MemoryInfo outInfo = new ActivityManager.MemoryInfo();
        am.getMemoryInfo(outInfo);

        return outInfo.lowMemory;
    }

    // FIXME: need to optimize this method.
    private static boolean isLowMemory(SQLiteException e) {
        return e.getMessage().equals(SQLITE_EXCEPTION_DETAIL_MESSAGE);
+1 −2
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.provider;

import com.google.android.mms.util.SqliteWrapper;

import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.ContentResolver;
@@ -25,6 +23,7 @@ import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SqliteWrapper;
import android.net.Uri;
import android.telephony.SmsMessage;
import android.text.TextUtils;
+0 −5
Original line number Diff line number Diff line
<body>

{@hide}

</body>
+0 −5
Original line number Diff line number Diff line
<body>

{@hide}

</body>
+0 −5
Original line number Diff line number Diff line
<body>

{@hide}

</body>
Loading