1// Copyright 2013 Google Inc. All Rights Reserved.
2
3package com.android.contacts.common.extensions;
4
5import android.content.Context;
6
7import com.android.contacts.common.list.DirectoryPartition;
8
9import java.util.List;
10
11/**
12 * An interface for adding extended phone directories to
13 * {@link com.android.contacts.common.list.PhoneNumberListAdapter}.
14 * An app that wishes to add custom phone directories should implement this class and advertise it
15 * in assets/contacts_extensions.properties. {@link ExtensionsFactory} will load the implementation
16 * and the extended directories will be added by
17 * {@link com.android.contacts.common.list.PhoneNumberListAdapter}.
18 */
19public interface ExtendedPhoneDirectoriesManager {
20
21    /**
22     * Return a list of extended directories to add. May return null if no directories are to be
23     * added.
24     */
25    List<DirectoryPartition> getExtendedDirectories(Context context);
26}
27