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

Commit 349ee026 authored by Eug89's avatar Eug89
Browse files

Merge branch 'eclair' of git://github.com/cyanogen/android_frameworks_base into eclair

parents 84d99265 f9d76066
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -143,8 +143,7 @@ public final class CursorToBulkCursorAdaptor extends BulkCursorNative

    public void close() {
        maybeUnregisterObserverProxy();
        mCursor.deactivate();       
        
        mCursor.close();       
    }

    public int requery(IContentObserver observer, CursorWindow window) {
+3 −0
Original line number Diff line number Diff line
@@ -31,5 +31,8 @@ interface IHardwareService

    // for the phone
    void setAttentionLight(boolean on, int color);

    // for LED color previews
    void pulseBreathingLightColor(int color);
}
+2 −2
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
        mText = (EditText) findViewById(R.id.timepicker_input);
        mText.setOnFocusChangeListener(this);
        mText.setFilters(new InputFilter[] {inputFilter});
        mText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
        mText.setRawInputType(InputType.TYPE_CLASS_PHONE);

        if (!isEnabled()) {
            setEnabled(false);
+2 −2
Original line number Diff line number Diff line
@@ -778,8 +778,8 @@ public class GradientDrawable extends Drawable {
                        com.android.internal.R.styleable.DrawableCorners_bottomLeftRadius, radius);
                int bottomRightRadius = a.getDimensionPixelSize(
                        com.android.internal.R.styleable.DrawableCorners_bottomRightRadius, radius);
                if (topLeftRadius != radius && topRightRadius != radius &&
                        bottomLeftRadius != radius && bottomRightRadius != radius) {
                if (topLeftRadius != radius || topRightRadius != radius ||
                        bottomLeftRadius != radius || bottomRightRadius != radius) {
                    setCornerRadii(new float[] {
                            topLeftRadius, topLeftRadius,
                            topRightRadius, topRightRadius,
+60 −18
Original line number Diff line number Diff line
@@ -641,8 +641,10 @@ void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client)

    sp<IBinder> binder = client->asBinder();
    if (mNotificationClients.indexOf(binder) < 0) {
        LOGV("Adding notification client %p", binder.get());
        binder->linkToDeath(this);
        LOGV("Adding notification client %p, and registering a new Grave DeathReceiver", binder.get());
        sp<Grave> aGrave = new Grave(this, IPCThreadState::self()->getCallingPid());
        binder->linkToDeath(aGrave);
        mGraveyard.add(aGrave);
        mNotificationClients.add(binder);
    }

@@ -657,22 +659,6 @@ void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client)
    }
}

void AudioFlinger::binderDied(const wp<IBinder>& who) {

    LOGV("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid());
    Mutex::Autolock _l(mLock);

    IBinder *binder = who.unsafe_get();

    if (binder != NULL) {
        int index = mNotificationClients.indexOf(binder);
        if (index >= 0) {
            LOGV("Removing notification client %p", binder);
            mNotificationClients.removeAt(index);
        }
    }
}

// audioConfigChanged_l() must be called with AudioFlinger::mLock held
void AudioFlinger::audioConfigChanged_l(int event, int ioHandle, void *param2) {
    size_t size = mNotificationClients.size();
@@ -2919,6 +2905,62 @@ const sp<MemoryDealer>& AudioFlinger::Client::heap() const

// ----------------------------------------------------------------------------

AudioFlinger::Grave::Grave(const sp<AudioFlinger>& audioFlinger, pid_t pid)
    :   mAudioFlinger(audioFlinger),
        mPid(pid)
{
}

void AudioFlinger::Grave::binderDied(const wp<IBinder>& who)
{
    LOGV("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid());
    Mutex::Autolock _l(mAudioFlinger->mLock);

    // holding a list of tracks to destory (avoiding modification of AF::MT::mTracks while iterating it)
    SortedVector< wp<MixerThread::Track> > tracksToRemove;

    for (size_t i = 0; i < mAudioFlinger->mPlaybackThreads.size(); i++) {
        PlaybackThread *thread = mAudioFlinger->mPlaybackThreads.valueAt(i).get();

        for (size_t i=0; i<thread->mActiveTracks.size(); i++) {
            wp<MixerThread::Track> wtrack = thread->mActiveTracks[i];
            sp<MixerThread::Track> strack = wtrack.unsafe_get();
            if (strack != NULL && strack->mClient->pid() == mPid) {
                tracksToRemove.add(wtrack);
            }
        }

        // remove all the tracks that need to be...
        size_t count = tracksToRemove.size();
        if (UNLIKELY(count)) {
            for (size_t i=0 ; i<count ; i++) {
                const sp<MixerThread::Track>& track = tracksToRemove[i].promote();
                thread->mActiveTracks.remove(track);
                if (track->isTerminated()) {
                    thread->mTracks.remove(track);
                    thread->deleteTrackName_l(track->mName);
                }
            }
        }

        tracksToRemove.clear();
    }

    IBinder *binder = who.unsafe_get();

    if (binder != NULL) {
        int index = mAudioFlinger->mNotificationClients.indexOf(binder);
        if (index >= 0) {
            LOGV("Removing notification client %p", binder);
            mAudioFlinger->mNotificationClients.removeAt(index);
        }
    }

    mAudioFlinger->mGraveyard.remove(this);
}

// ----------------------------------------------------------------------------

AudioFlinger::TrackHandle::TrackHandle(const sp<AudioFlinger::PlaybackThread::Track>& track)
    : BnAudioTrack(),
      mTrack(track)
Loading