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

Commit 511396ce authored by Ricky Wai's avatar Ricky Wai Committed by android-build-merger
Browse files

Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev

am: f3a7d7cce7

* commit 'f3a7d7cce730c9226841c5148bec2e79538a7096':
  Fix enterprise contacts APIs naming and docs

Change-Id: Id0ac7eef7120eca1cced765caec27b8087268bad
parents c1e48980 f600f07e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,9 +39,9 @@ public class DirectoryCompat {
        return directoryId == Directory.LOCAL_INVISIBLE;
    }

    public static boolean isRemoteDirectory(long directoryId) {
    public static boolean isRemoteDirectoryId(long directoryId) {
        if (ContactsUtils.FLAG_N_FEATURE) {
            return DirectorySdkCompat.isRemoteDirectory(directoryId);
            return DirectorySdkCompat.isRemoteDirectoryId(directoryId);
        }
        return !(directoryId == Directory.DEFAULT || directoryId == Directory.LOCAL_INVISIBLE);
    }
+2 −2
Original line number Diff line number Diff line
@@ -419,7 +419,7 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter {
            if (getPartitionByDirectoryId(id) == -1) {
                DirectoryPartition partition = new DirectoryPartition(false, true);
                partition.setDirectoryId(id);
                if (DirectoryCompat.isRemoteDirectory(id)) {
                if (DirectoryCompat.isRemoteDirectoryId(id)) {
                    if (DirectoryCompat.isEnterpriseDirectoryId(id)) {
                        partition.setLabel(mContext.getString(R.string.directory_search_label_work));
                    } else {
@@ -642,7 +642,7 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter {
        TextView labelTextView = (TextView)view.findViewById(R.id.label);
        TextView displayNameTextView = (TextView)view.findViewById(R.id.display_name);
        labelTextView.setText(directoryPartition.getLabel());
        if (!DirectoryCompat.isRemoteDirectory(directoryId)) {
        if (!DirectoryCompat.isRemoteDirectoryId(directoryId)) {
            displayNameTextView.setText(null);
        } else {
            String directoryName = directoryPartition.getDisplayName();
+4 −3
Original line number Diff line number Diff line
@@ -211,7 +211,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
            loader.setUri(builder.build());
            loader.setProjection(PhoneQuery.PROJECTION_PRIMARY);
        } else {
            final boolean isRemoteDirectoryQuery = DirectoryCompat.isRemoteDirectory(directoryId);
            final boolean isRemoteDirectoryQuery
                    = DirectoryCompat.isRemoteDirectoryId(directoryId);
            final Builder builder;
            if (isSearchMode()) {
                final Uri baseUri;
@@ -342,7 +343,7 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
    public Uri getDataUri(int partitionIndex, Cursor cursor) {
        final long directoryId =
                ((DirectoryPartition)getPartition(partitionIndex)).getDirectoryId();
        if (DirectoryCompat.isRemoteDirectory(directoryId)) {
        if (DirectoryCompat.isRemoteDirectoryId(directoryId)) {
            return null;
        } else if (DirectoryCompat.isEnterpriseDirectoryId(directoryId)) {
            /*
@@ -609,7 +610,7 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
                if (id > maxId) {
                    maxId = id;
                }
                if (!DirectoryCompat.isRemoteDirectory(id)) {
                if (!DirectoryCompat.isRemoteDirectoryId(id)) {
                    // assuming remote directories come after local, we will end up with the index
                    // where we should insert extended directories. This also works if there are no
                    // remote directories at all.