Projects >> platform_frameworks_base >>46566ebbf54769e707023f2db93132d2d2ae1d1b

Chunk
Conflicting content
        // Broadcast vibrate settings
        broadcastVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
        broadcastVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION);
<<<<<<< HEAD

        // Load settings for the volume controller
        mVolumeController.loadSettings(cr);
=======
>>>>>>> f557832ad82041b17a15448e3b776fdef4ba747b
    }

    private int rescaleIndex(int index, int srcStream, int dstStream) {
Solution content
        // Broadcast vibrate settings
        broadcastVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
        broadcastVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION);

        // Load settings for the volume controller
        mVolumeController.loadSettings(cr);
    }

    private int rescaleIndex(int index, int srcStream, int dstStream) {
File
AudioService.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Chunk
Conflicting content
        @Override
        public void handleMessage(Message msg) {
            switch(msg.what) {
<<<<<<< HEAD
=======

>>>>>>> f557832ad82041b17a15448e3b776fdef4ba747b
                case MSG_RCDISPLAY_CLEAR:
                    onRcDisplayClear();
                    break;
Solution content
        @Override
        public void handleMessage(Message msg) {
            switch(msg.what) {
                case MSG_RCDISPLAY_CLEAR:
                    onRcDisplayClear();
                    break;
File
MediaFocusControl.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
    /**
     * Helper function:
<<<<<<< HEAD
     * Push the new media button receiver "near" the top of the PlayerRecord stack.
     * "Near the top" is defined as:
     *   - at the top if the current PlayerRecord at the top is not playing
     *   - below the entries at the top of the stack that correspond to the playing PlayerRecord
     *     otherwise
     * Called synchronized on mPRStack
=======
     * Remove any entry in the remote control stack that has the same package name as packageName
     * Pre-condition: packageName != null
     */
    private void cleanupMediaButtonReceiverForPackage(String packageName, boolean removeAll) {
        synchronized(mRCStack) {
            if (mRCStack.empty()) {
                return;
            } else {
                final PackageManager pm = mContext.getPackageManager();
                RemoteControlStackEntry oldTop = mRCStack.peek();
                Iterator stackIterator = mRCStack.iterator();
                // iterate over the stack entries
                // (using an iterator on the stack so we can safely remove an entry after having
                //  evaluated it, traversal order doesn't matter here)
                while(stackIterator.hasNext()) {
                    RemoteControlStackEntry rcse = (RemoteControlStackEntry)stackIterator.next();
                    if (removeAll && packageName.equals(rcse.mMediaIntent.getCreatorPackage())) {
                        // a stack entry is from the package being removed, remove it from the stack
                        stackIterator.remove();
                        rcse.destroy();
                    } else if (rcse.mReceiverComponent != null) {
                        try {
                            // Check to see if this receiver still exists.
                            pm.getReceiverInfo(rcse.mReceiverComponent, 0);
                        } catch (PackageManager.NameNotFoundException e) {
                            // Not found -- remove it!
                            stackIterator.remove();
                            rcse.destroy();
                        }
                    }
                }
            }
        }
    }

    /**
     * Helper function:
     * Set the new remote control receiver at the top of the RC focus stack.
     * Called synchronized on mAudioFocusLock, then mRCStack
>>>>>>> f557832ad82041b17a15448e3b776fdef4ba747b
     * precondition: mediaIntent != null
     * @return true if the top of mPRStack was changed, false otherwise
     */
Solution content
    /**
     * Helper function:
     * Push the new media button receiver "near" the top of the PlayerRecord stack.
     * "Near the top" is defined as:
     *   - at the top if the current PlayerRecord at the top is not playing
     *   - below the entries at the top of the stack that correspond to the playing PlayerRecord
     *     otherwise
     * Called synchronized on mPRStack
     * precondition: mediaIntent != null
     * @return true if the top of mPRStack was changed, false otherwise
     */
File
MediaFocusControl.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
                }
            }

<<<<<<< HEAD
            if (inStackIndex == -1) {
                // is not in stack
                prse = new PlayerRecord(mediaIntent, target, token);
                // it's new so it's not playing (no RemoteControlClient to give a playstate),
                // therefore it goes after the ones with active playback
                mPRStack.add(lastPlayingIndex, prse);
            } else {
                // is in the stack
                if (mPRStack.size() > 1) { // no need to remove and add if stack contains only 1
                    prse = mPRStack.elementAt(inStackIndex);
                    // remove it from its old location in the stack
                    mPRStack.removeElementAt(inStackIndex);
                    if (prse.isPlaybackActive()) {
                        // and put it at the top
                        mPRStack.push(prse);
                    } else {
                        // and put it after the ones with active playback
                        if (inStackIndex > lastPlayingIndex) {
                            mPRStack.add(lastPlayingIndex, prse);
                        } else {
                            mPRStack.add(lastPlayingIndex - 1, prse);
                        }
                    }
                }
            }

        } catch (ArrayIndexOutOfBoundsException e) {
            // not expected to happen, indicates improper concurrent modification or bad index
            Log.e(TAG, "Wrong index (inStack=" + inStackIndex + " lastPlaying=" + lastPlayingIndex
                    + " size=" + mPRStack.size()
                    + " accessing media button stack", e);
        }

        return (topChanged);
=======
        // RC stack was modified
        return true;
>>>>>>> f557832ad82041b17a15448e3b776fdef4ba747b
    }

    /**
Solution content
                }
            }

            if (inStackIndex == -1) {
                // is not in stack
                prse = new PlayerRecord(mediaIntent, target, token);
                // it's new so it's not playing (no RemoteControlClient to give a playstate),
                // therefore it goes after the ones with active playback
                mPRStack.add(lastPlayingIndex, prse);
            } else {
                // is in the stack
                if (mPRStack.size() > 1) { // no need to remove and add if stack contains only 1
                    prse = mPRStack.elementAt(inStackIndex);
                    // remove it from its old location in the stack
                    mPRStack.removeElementAt(inStackIndex);
                    if (prse.isPlaybackActive()) {
                        // and put it at the top
                        mPRStack.push(prse);
                    } else {
                        // and put it after the ones with active playback
                        if (inStackIndex > lastPlayingIndex) {
                            mPRStack.add(lastPlayingIndex, prse);
                        } else {
                            mPRStack.add(lastPlayingIndex - 1, prse);
                        }
                    }
                }
            }

        } catch (ArrayIndexOutOfBoundsException e) {
            // not expected to happen, indicates improper concurrent modification or bad index
            Log.e(TAG, "Wrong index (inStack=" + inStackIndex + " lastPlaying=" + lastPlayingIndex
                    + " size=" + mPRStack.size()
                    + " accessing media button stack", e);
        }

        return (topChanged);
    }

    /**
File
MediaFocusControl.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Comment
If statement
Return statement
Variable
Chunk
Conflicting content
        return false;
    }

<<<<<<< HEAD
=======

>>>>>>> f557832ad82041b17a15448e3b776fdef4ba747b
    //==========================================================================================
    // Remote control display / client
    //==========================================================================================
Solution content
        return false;
    }

    //==========================================================================================
    // Remote control display / client
    //==========================================================================================
File
MediaFocusControl.java
Developer's decision
Version 1
Kind of conflict
Blank