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

Commit 82afaa47 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'froyo' into froyo-release

parents 30ccec72 251ccef0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ public class DefaultContainerService extends IntentService {
                return PackageHelper.RECOMMEND_INSTALL_EXTERNAL;
            }
        }
        if (checkExt || checkBoth && !mediaAvailable) {
        if ((checkExt || checkBoth) && !mediaAvailable) {
            return PackageHelper.RECOMMEND_MEDIA_UNAVAILABLE;
        }
        return PackageHelper.RECOMMEND_FAILED_INSUFFICIENT_STORAGE;
+7 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ public class ThrottleService extends IThrottleManager.Stub {

    private Context mContext;

    private static final int INITIAL_POLL_DELAY_SEC = 90;
    private static final int TESTING_POLLING_PERIOD_SEC = 60 * 1;
    private static final int TESTING_RESET_PERIOD_SEC = 60 * 10;
    private static final long TESTING_THRESHOLD = 1 * 1024 * 1024;
@@ -331,6 +332,12 @@ public class ThrottleService extends IThrottleManager.Stub {

            // get policy
            mHandler.obtainMessage(EVENT_POLICY_CHANGED).sendToTarget();

            // if we poll now we won't have network connectivity or even imsi access
            // queue up a poll to happen in a little while - after ntp and imsi are avail
            // TODO - make this callback based (ie, listen for notificaitons)
            mHandler.sendMessageDelayed(mHandler.obtainMessage(EVENT_POLL_ALARM),
                    INITIAL_POLL_DELAY_SEC * 1000);
        }

        // check for new policy info (threshold limit/value/etc)
+10 −8
Original line number Diff line number Diff line
@@ -7580,8 +7580,9 @@ public class WindowManagerService extends IWindowManager.Stub
                while (i > 0) {
                    i--;
                    WindowState c = (WindowState)mChildWindows.get(i);
                    if (c.mSurface != null && c.mAttachedHidden) {
                    if (c.mAttachedHidden) {
                        c.mAttachedHidden = false;
                        if (c.mSurface != null) {
                            c.performShowLocked();
                            // It hadn't been shown, which means layout not
                            // performed on it, so now we want to make sure to
@@ -7591,6 +7592,7 @@ public class WindowManagerService extends IWindowManager.Stub
                            mLayoutNeeded = true;
                        }
                    }
                }

                if (mAttrs.type != TYPE_APPLICATION_STARTING
                        && mAppToken != null) {
+28 −9
Original line number Diff line number Diff line
@@ -315,6 +315,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
    // without empty apps being able to push them out of memory.
    static final int MIN_HIDDEN_APPS = 2;
    
    // The maximum number of hidden processes we will keep around before
    // killing them; this is just a control to not let us go too crazy with
    // keeping around processes on devices with large amounts of RAM.
    static final int MAX_HIDDEN_APPS = 15;
    
    // We put empty content processes after any hidden processes that have
    // been idle for less than 30 seconds.
    static final long CONTENT_APP_IDLE_OFFSET = 30*1000;
@@ -8488,8 +8493,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                }
                int adj = proc.setAdj;
                if (adj >= worstType) {
                    Slog.w(TAG, "Killing " + reason + " : " + proc + " (adj "
                            + adj + ")");
                    Slog.w(TAG, "Killing " + proc + " (adj " + adj + "): " + reason);
                    EventLog.writeEvent(EventLogTags.AM_KILL, proc.pid,
                            proc.processName, adj, reason);
                    killed = true;
@@ -8904,9 +8908,10 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
            }
            if (app.pid > 0 && app.pid != MY_PID) {
                handleAppCrashLocked(app);
                Slog.i(ActivityManagerService.TAG, "Killing process "
                        + app.processName
                        + " (pid=" + app.pid + ") at user's request");
                Slog.i(ActivityManagerService.TAG, "Killing "
                        + app.processName + " (pid=" + app.pid + "): user's request");
                EventLog.writeEvent(EventLogTags.AM_KILL, app.pid,
                        app.processName, app.setAdj, "user's request after error");
                Process.killProcess(app.pid);
            }
        }
@@ -10434,10 +10439,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
            if (!capp.persistent && capp.thread != null
                    && capp.pid != 0
                    && capp.pid != MY_PID) {
                Slog.i(TAG, "Killing app " + capp.processName
                        + " (pid " + capp.pid
                        + ") because provider " + cpr.info.name
                        + " is in dying process " + proc.processName);
                Slog.i(TAG, "Kill " + capp.processName
                        + " (pid " + capp.pid + "): provider " + cpr.info.name
                        + " in dying process " + proc.processName);
                EventLog.writeEvent(EventLogTags.AM_KILL, capp.pid,
                        capp.processName, capp.setAdj, "dying provider " + proc.processName);
                Process.killProcess(capp.pid);
            }
        }
@@ -11522,6 +11528,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                    if (r.isForeground) {
                        r.isForeground = false;
                        if (r.app != null) {
                            updateLruProcessLocked(r.app, false, true);
                            updateServiceForegroundLocked(r.app, true);
                        }
                    }
@@ -14244,6 +14251,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
        int factor = (mLruProcesses.size()-4)/numSlots;
        if (factor < 1) factor = 1;
        int step = 0;
        int numHidden = 0;
        
        // First try updating the OOM adjustment for each of the
        // application processes based on their current state.
@@ -14262,6 +14270,17 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                        curHiddenAdj++;
                    }
                }
                if (app.curAdj >= HIDDEN_APP_MIN_ADJ) {
                    numHidden++;
                    if (numHidden > MAX_HIDDEN_APPS) {
                        Slog.i(TAG, "Kill " + app.processName
                                + " (pid " + app.pid + "): hidden #" + numHidden
                                + " beyond limit " + MAX_HIDDEN_APPS);
                        EventLog.writeEvent(EventLogTags.AM_KILL, app.pid,
                                app.processName, app.setAdj, "too many background");
                        Process.killProcess(app.pid);
                    }
                }
            } else {
                didOomAdj = false;
            }
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.internal.telephony.SmsHeader;
import java.util.Arrays;

import static android.telephony.SmsMessage.MessageClass;
import android.provider.Telephony;

/**
 * Base class declaring the specific methods and members for SmsMessage.
@@ -386,7 +387,7 @@ public abstract class SmsMessageBase {
         if (parts.length < 2) return;
         emailFrom = parts[0];
         emailBody = parts[1];
         isEmail = true;
         isEmail = Telephony.Mms.isEmailAddress(emailFrom);
    }

}