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

Commit c3806192 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Merge branch 'ics' into github/ics

Change-Id: Id94bf36465511fdaf3b7500987e7ab2697c72c0e
parents 6b48da61 bdb38ac4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ interface IProfileManager
    Profile[] getProfiles();
    boolean profileExists(in ParcelUuid profileUuid);
    boolean profileExistsByName(String profileName);
    boolean notificationGroupExistsByName(String notificationGroupName);

    NotificationGroup[] getNotificationGroups();
    void addNotificationGroup(in NotificationGroup group);
+7 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;

@@ -80,6 +81,12 @@ public class NotificationGroup implements Parcelable {
        return mName;
    }

    public void setName(String name) {
        mName = name;
        mNameResId = -1;
        mDirty = true;
    }

    public UUID getUuid() {
        return mUuid;
    }
+15 −2
Original line number Diff line number Diff line
@@ -152,7 +152,8 @@ public class ProfileManager {
            return getService().profileExistsByName(profileName);
        } catch (RemoteException e) {
            Log.e(TAG, e.getLocalizedMessage(), e);
            // To be on the safe side, we'll return "true", to prevent duplicate profiles from being created.
            // To be on the safe side, we'll return "true", to prevent duplicate profiles
            // from being created.
            return true;
        }
    }
@@ -162,7 +163,19 @@ public class ProfileManager {
            return getService().profileExists(new ParcelUuid(profileUuid));
        } catch (RemoteException e) {
            Log.e(TAG, e.getLocalizedMessage(), e);
            // To be on the safe side, we'll return "true", to prevent duplicate profiles from being created.
            // To be on the safe side, we'll return "true", to prevent duplicate profiles
            // from being created.
            return true;
        }
    }

    public boolean notificationGroupExists(String notificationGroupName) {
        try {
            return getService().notificationGroupExistsByName(notificationGroupName);
        } catch (RemoteException e) {
            Log.e(TAG, e.getLocalizedMessage(), e);
            // To be on the safe side, we'll return "true", to prevent duplicate notification
            // groups from being created.
            return true;
        }
    }
+2 −0
Original line number Diff line number Diff line
@@ -166,9 +166,11 @@ static const CodecInfo kDecoderInfo[] = {
    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.video.decoder.avc" },
    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.TI.Video.Decoder" },
    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.SEC.AVC.Decoder" },
    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.SEC.FP.AVC.Decoder" },
    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.google.h264.decoder" },
    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.google.avc.decoder" },
    { MEDIA_MIMETYPE_AUDIO_VORBIS, "OMX.google.vorbis.decoder" },
    { MEDIA_MIMETYPE_VIDEO_VPX, "OMX.SEC.VP8.Decoder" },
    { MEDIA_MIMETYPE_VIDEO_VPX, "OMX.google.vpx.decoder" },
    { MEDIA_MIMETYPE_VIDEO_MPEG2, "OMX.Nvidia.mpeg2v.decode" },
};
+10 −0
Original line number Diff line number Diff line
@@ -341,6 +341,16 @@ public class ProfileManagerService extends IProfileManager.Stub {
        return false;
    }

    @Override
    public boolean notificationGroupExistsByName(String notificationGroupName) throws RemoteException {
        for (NotificationGroup group : mGroups.values()) {
            if (group.getName().equalsIgnoreCase(notificationGroupName)) {
                return true;
            }
        }
        return false;
    }

    @Override
    public NotificationGroup[] getNotificationGroups() throws RemoteException {
        return mGroups.values().toArray(new NotificationGroup[mGroups.size()]);