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

Commit f1e484ac authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

auto import from //branches/cupcake/...@127436

parent 22f7dfd2
Loading
Loading
Loading
Loading
+166 −0
Original line number Diff line number Diff line
@@ -3738,6 +3738,17 @@
 visibility="public"
>
</field>
<field name="initialLayout"
 type="int"
 transient="false"
 volatile="false"
 value="16843351"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="innerRadiusRatio"
 type="int"
 transient="false"
@@ -7555,6 +7566,17 @@
 visibility="public"
>
</field>
<field name="updatePeriodMillis"
 type="int"
 transient="false"
 volatile="false"
 value="16843350"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="useLevel"
 type="int"
 transient="false"
@@ -13212,6 +13234,17 @@
<parameter name="event" type="android.view.MotionEvent">
</parameter>
</method>
<method name="onUserLeaving"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="protected"
>
</method>
<method name="onWindowAttributesChanged"
 return="void"
 abstract="false"
@@ -17295,6 +17328,19 @@
<parameter name="activity" type="android.app.Activity">
</parameter>
</method>
<method name="callActivityOnUserLeaving"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="activity" type="android.app.Activity">
</parameter>
</method>
<method name="callApplicationOnCreate"
 return="void"
 abstract="false"
@@ -27528,6 +27574,17 @@
 visibility="public"
>
</field>
<field name="FLAG_ACTIVITY_NO_USER_ACTION"
 type="int"
 transient="false"
 volatile="false"
 value="262144"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FLAG_ACTIVITY_PREVIOUS_IS_TOP"
 type="int"
 transient="false"
@@ -41330,6 +41387,19 @@
<parameter name="isMutable" type="boolean">
</parameter>
</method>
<method name="copyPixelsFromBuffer"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="src" type="java.nio.Buffer">
</parameter>
</method>
<method name="copyPixelsToBuffer"
 return="void"
 abstract="false"
@@ -129780,6 +129850,17 @@
 deprecated="not deprecated"
 visibility="public"
>
<method name="beginBatchEdit"
 return="boolean"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="clearMetaKeyStates"
 return="boolean"
 abstract="true"
@@ -129836,6 +129917,17 @@
<parameter name="rightLength" type="int">
</parameter>
</method>
<method name="endBatchEdit"
 return="boolean"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="finishComposingText"
 return="boolean"
 abstract="true"
@@ -130002,6 +130094,17 @@
<parameter name="base" type="android.view.inputmethod.InputConnection">
</parameter>
</constructor>
<method name="beginBatchEdit"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="clearMetaKeyStates"
 return="boolean"
 abstract="false"
@@ -130058,6 +130161,17 @@
<parameter name="rightLength" type="int">
</parameter>
</method>
<method name="endBatchEdit"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="finishComposingText"
 return="boolean"
 abstract="false"
@@ -145853,6 +145967,21 @@
<parameter name="running" type="boolean">
</parameter>
</method>
<method name="setImageViewBitmap"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="viewId" type="int">
</parameter>
<parameter name="bitmap" type="android.graphics.Bitmap">
</parameter>
</method>
<method name="setImageViewResource"
 return="void"
 abstract="false"
@@ -145883,6 +146012,21 @@
<parameter name="uri" type="android.net.Uri">
</parameter>
</method>
<method name="setOnClickPendingIntent"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="viewId" type="int">
</parameter>
<parameter name="pendingIntent" type="android.app.PendingIntent">
</parameter>
</method>
<method name="setProgressBar"
 return="void"
 abstract="false"
@@ -149295,6 +149439,17 @@
 visibility="public"
>
</method>
<method name="onBeginBatchEdit"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="onCommitCompletion"
 return="void"
 abstract="false"
@@ -149308,6 +149463,17 @@
<parameter name="text" type="android.view.inputmethod.CompletionInfo">
</parameter>
</method>
<method name="onEndBatchEdit"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="onPreDraw"
 return="boolean"
 abstract="false"
+3 −3
Original line number Diff line number Diff line
@@ -118,12 +118,12 @@ int free_cache(int free_size)
    if (avail < 0) return -1;

    LOGI("free_cache(%d) avail %d\n", free_size, avail);
    if (avail > free_size) return 0;
    if (avail >= free_size) return 0;

    d = opendir(PKG_DIR_PREFIX);
    if (d == NULL) {
        LOGE("cannot open %s\n", PKG_DIR_PREFIX);
        return 0;
        return -1;
    }
    dfd = dirfd(d);

@@ -144,7 +144,7 @@ int free_cache(int free_size)
        close(subfd);

        avail = disk_free();
        if (avail > free_size) {
        if (avail >= free_size) {
            closedir(d);
            return 0;
        }
+15 −0
Original line number Diff line number Diff line
@@ -1131,6 +1131,17 @@ public class Activity extends ContextThemeWrapper
        mCalled = true;
    }

    /**
     * Called as part of the activity lifecycle when an activity is about to go
     * into the background as the result of user choice.  For example, when the
     * user presses the Home key, {@link #onUserLeaving} will be called, but
     * when an incoming phone call causes the in-call Activity to be automatically
     * brought to the foreground, {@link #onUserLeaving} will not be called on
     * the activity being interrupted.
     */
    protected void onUserLeaving() {
    }
    
    /**
     * Generate a new thumbnail for this activity.  This method is called before
     * pausing the activity, and should draw into <var>outBitmap</var> the
@@ -3470,6 +3481,10 @@ public class Activity extends ContextThemeWrapper
        onPause();
    }
    
    final void performUserLeaving() {
        onUserLeaving();
    }
    
    final void performStop() {
        if (!mStopped) {
            if (mWindow != null) {
+16 −5
Original line number Diff line number Diff line
@@ -1207,10 +1207,12 @@ public final class ActivityThread {
        private static final String TWO_COUNT_COLUMNS = "%17s %8d %17s %8d";

        public final void schedulePauseActivity(IBinder token, boolean finished,
                int configChanges) {
                boolean userLeaving, int configChanges) {
            queueOrSendMessage(
                    finished ? H.PAUSE_ACTIVITY_FINISHING : H.PAUSE_ACTIVITY,
                    token, configChanges);
                    token,
                    (userLeaving ? 1 : 0),
                    configChanges);
        }

        public final void scheduleStopActivity(IBinder token, boolean showWindow,
@@ -1588,10 +1590,10 @@ public final class ActivityThread {
                    handleRelaunchActivity(r, msg.arg1);
                } break;
                case PAUSE_ACTIVITY:
                    handlePauseActivity((IBinder)msg.obj, false, msg.arg2);
                    handlePauseActivity((IBinder)msg.obj, false, msg.arg1 != 0, msg.arg2);
                    break;
                case PAUSE_ACTIVITY_FINISHING:
                    handlePauseActivity((IBinder)msg.obj, true, msg.arg2);
                    handlePauseActivity((IBinder)msg.obj, true, msg.arg1 != 0, msg.arg2);
                    break;
                case STOP_ACTIVITY_SHOW:
                    handleStopActivity((IBinder)msg.obj, true, msg.arg2);
@@ -2647,9 +2649,14 @@ public final class ActivityThread {
    }

    private final void handlePauseActivity(IBinder token, boolean finished,
            int configChanges) {
            boolean userLeaving, int configChanges) {
        ActivityRecord r = mActivities.get(token);
        if (r != null) {
            //Log.v(TAG, "userLeaving=" + userLeaving + " handling pause of " + r);
            if (userLeaving) {
                performUserLeavingActivity(r);
            }
            
            r.activity.mConfigChangeFlags |= configChanges;
            Bundle state = performPauseActivity(token, finished, true);

@@ -2661,6 +2668,10 @@ public final class ActivityThread {
        }
    }

    final void performUserLeavingActivity(ActivityRecord r) {
        mInstrumentation.callActivityOnUserLeaving(r.activity);
    }

    final Bundle performPauseActivity(IBinder token, boolean finished,
            boolean saveState) {
        ActivityRecord r = mActivities.get(token);
+18 −4
Original line number Diff line number Diff line
@@ -315,8 +315,13 @@ class ApplicationContext extends Context {
            backup.renameTo(f);
        }

        // Debugging
        if (f.exists() && !f.canRead()) {
            Log.w(TAG, "Attempt to read preferences file " + f + " without permission");
        }
        
        Map map = null;
        if (f.exists()) {
        if (f.exists() && f.canRead()) {
            try {
                str = new FileInputStream(f);
                map = XmlUtils.readMapXml(str);
@@ -2264,14 +2269,23 @@ class ApplicationContext extends Context {
            }
        }
        @Override
        public void freeApplicationCache(long idealStorageSize, 
                IPackageDataObserver observer) {
        public void freeStorageAndNotify(long idealStorageSize, IPackageDataObserver observer) {
            try {
                mPM.freeApplicationCache(idealStorageSize, observer);
                mPM.freeStorageAndNotify(idealStorageSize, observer);
            } catch (RemoteException e) {
                // Should never happen!
            }
        }
        
        @Override
        public void freeStorage(long idealStorageSize, PendingIntent opFinishedIntent) {
            try {
                mPM.freeStorage(idealStorageSize, opFinishedIntent);
            } catch (RemoteException e) {
                // Should never happen!
            }
        }
        
        @Override
        public void getPackageSizeInfo(String packageName, 
                IPackageStatsObserver observer) {
Loading