From c043752ca3cdd71fbee868a351881bd4272c31a7 Mon Sep 17 00:00:00 2001 From: Evan Millar Date: Tue, 23 Jun 2009 17:31:05 -0700 Subject: [PATCH] Adds precedence information to the CommonDataKinds.Im class. There is now a method getPresencePrecedence() that returns an integer representing the precedence of a presence status, 1 being the highest prcedence. --- core/java/android/provider/ContactsContract.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 1ed0574046e49..b8504f8cba150 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -16,6 +16,9 @@ package android.provider; +import java.util.Arrays; +import java.util.List; + import android.content.Intent; import android.graphics.BitmapFactory; import android.net.Uri; @@ -520,6 +523,18 @@ public final class ContactsContract { } } + /** + * Returns the precedence of the status code the higher number being the higher precedence. + * + * @param status The status code. + * @return An integer representing the precedence, 0 being the lowest. + */ + public static final int getPresencePrecedence(int status) { + // Keep this function here incase we want to enforce a different precedence than the + // natural order of the status constants. + return status; + } + /** * The MIME type of {@link #CONTENT_URI} providing a directory of * presence details.