android.content.RestrictionEntry源码实例Demo

类android.content.RestrictionEntry源码实例Demo

下面列出了android.content.RestrictionEntry 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

private void resolveRestrictions() {
    RestrictionsManager manager =
            (RestrictionsManager) getActivity().getSystemService(Context.RESTRICTIONS_SERVICE);
    Bundle restrictions = manager.getApplicationRestrictions();
    List<RestrictionEntry> entries = manager.getManifestRestrictions(
            getActivity().getApplicationContext().getPackageName());
    for (RestrictionEntry entry : entries) {
        String key = entry.getKey();
        Log.d(TAG, "key: " + key);
        if (key.equals(KEY_CAN_SAY_HELLO)) {
            updateCanSayHello(entry, restrictions);
        } else if (key.equals(KEY_MESSAGE)) {
            updateMessage(entry, restrictions);
        } else if (key.equals(KEY_NUMBER)) {
            updateNumber(entry, restrictions);
        } else if (key.equals(KEY_RANK)) {
            updateRank(entry, restrictions);
        } else if (key.equals(KEY_APPROVALS)) {
            updateApprovals(entry, restrictions);
        } else if (key.equals(KEY_ITEMS)) {
            updateItems(restrictions);
        }
    }
}
 
private ArrayList<RestrictionEntry> initRestrictions(Context context) {
    ArrayList<RestrictionEntry> newRestrictions = new ArrayList<>();
    Resources res = context.getResources();

    RestrictionEntry reBoolean = new RestrictionEntry(KEY_BOOLEAN, false);
    populateBooleanEntry(res, reBoolean);
    newRestrictions.add(reBoolean);

    RestrictionEntry reSingleChoice = new RestrictionEntry(KEY_CHOICE, (String) null);
    populateChoiceEntry(res, reSingleChoice);
    newRestrictions.add(reSingleChoice);

    RestrictionEntry reMultiSelect = new RestrictionEntry(KEY_MULTI_SELECT, (String[]) null);
    populateMultiEntry(res, reMultiSelect);
    newRestrictions.add(reMultiSelect);

    return newRestrictions;
}
 
protected RestrictionEntry[] convertBundleToRestrictions(Bundle restrictionBundle) {
    List<RestrictionEntry> restrictionEntries = new ArrayList<>();
    Set<String> keys = restrictionBundle.keySet();
    for (String key : keys) {
        Object value = restrictionBundle.get(key);
        if (value instanceof Boolean) {
            restrictionEntries.add(new RestrictionEntry(key, (boolean) value));
        } else if (value instanceof Integer) {
            restrictionEntries.add(new RestrictionEntry(key, (int) value));
        } else if (value instanceof String) {
            RestrictionEntry entry = new RestrictionEntry(RestrictionEntry.TYPE_STRING, key);
            entry.setSelectedString((String) value);
            restrictionEntries.add(entry);
        } else if (value instanceof String[]) {
            restrictionEntries.add(new RestrictionEntry(key, (String[]) value));
        } else if (value instanceof Bundle) {
            addBundleEntryToRestrictions(restrictionEntries, key, (Bundle) value);
        } else if (value instanceof Parcelable[]) {
            addBundleArrayToRestrictions(restrictionEntries, key, (Parcelable[]) value);
        }
    }
    return restrictionEntries.toArray(new RestrictionEntry[0]);
}
 
private int getTypeIndexFromRestrictionType(int restrictionType) {
    switch (restrictionType) {
        case RestrictionEntry.TYPE_BOOLEAN:
            return KeyValuePairDialogFragment.DialogType.BOOL_TYPE;
        case RestrictionEntry.TYPE_INTEGER:
            return KeyValuePairDialogFragment.DialogType.INT_TYPE;
        case RestrictionEntry.TYPE_STRING:
            return KeyValuePairDialogFragment.DialogType.STRING_TYPE;
        case RestrictionEntry.TYPE_MULTI_SELECT:
            return KeyValuePairDialogFragment.DialogType.STRING_ARRAY_TYPE;
        case RestrictionEntry.TYPE_BUNDLE:
            return KeyValuePairDialogFragment.DialogType.BUNDLE_TYPE;
        case RestrictionEntry.TYPE_BUNDLE_ARRAY:
            return KeyValuePairDialogFragment.DialogType.BUNDLE_ARRAY_TYPE;
        default:
            throw new AssertionError("Unknown restriction type");
    }
}
 
private int getRestrictionTypeFromDialogType(int typeIndex) {
    switch (typeIndex) {
        case KeyValuePairDialogFragment.DialogType.BOOL_TYPE:
            return RestrictionEntry.TYPE_BOOLEAN;
        case KeyValuePairDialogFragment.DialogType.INT_TYPE:
            return RestrictionEntry.TYPE_INTEGER;
        case KeyValuePairDialogFragment.DialogType.STRING_TYPE:
            return RestrictionEntry.TYPE_STRING;
        case KeyValuePairDialogFragment.DialogType.STRING_ARRAY_TYPE:
            return RestrictionEntry.TYPE_MULTI_SELECT;
        case KeyValuePairDialogFragment.DialogType.BUNDLE_TYPE:
            return RestrictionEntry.TYPE_BUNDLE;
        case KeyValuePairDialogFragment.DialogType.BUNDLE_ARRAY_TYPE:
            return RestrictionEntry.TYPE_BUNDLE_ARRAY;
        default:
            throw new AssertionError("Unknown type index");
    }
}
 
@TargetApi(VERSION_CODES.M)
private static void addBundleArrayRestrictionToBundle(Bundle bundle, RestrictionEntry entry) {
    if (Util.SDK_INT >= VERSION_CODES.M) {
        RestrictionEntry[] bundleRestrictionArray = entry.getRestrictions();
        Bundle[] bundleArray = new Bundle[bundleRestrictionArray.length];
        for (int i = 0; i < bundleRestrictionArray.length; i++) {
            RestrictionEntry[] bundleRestrictions =
                    bundleRestrictionArray[i].getRestrictions();
            if (bundleRestrictions == null) {
                // Non-bundle entry found in bundle array.
                Log.w(TAG, "addRestrictionToBundle: " +
                        "Non-bundle entry found in bundle array");
                bundleArray[i] = new Bundle();
            } else {
                bundleArray[i] = convertRestrictionsToBundle(Arrays.asList(
                        bundleRestrictions));
            }
        }
        bundle.putParcelableArray(entry.getKey(), bundleArray);
    } else {
        Log.w(TAG, "addBundleArrayRestrictionToBundle is called in pre-M");
    }
}
 
private void resolveRestrictions() {
    RestrictionsManager manager =
            (RestrictionsManager) getActivity().getSystemService(Context.RESTRICTIONS_SERVICE);
    Bundle restrictions = manager.getApplicationRestrictions();
    List<RestrictionEntry> entries = manager.getManifestRestrictions(
            getActivity().getApplicationContext().getPackageName());
    for (RestrictionEntry entry : entries) {
        String key = entry.getKey();
        Log.d(TAG, "key: " + key);
        if (key.equals(KEY_CAN_SAY_HELLO)) {
            updateCanSayHello(entry, restrictions);
        } else if (key.equals(KEY_MESSAGE)) {
            updateMessage(entry, restrictions);
        } else if (key.equals(KEY_NUMBER)) {
            updateNumber(entry, restrictions);
        } else if (key.equals(KEY_RANK)) {
            updateRank(entry, restrictions);
        } else if (key.equals(KEY_APPROVALS)) {
            updateApprovals(entry, restrictions);
        } else if (key.equals(KEY_ITEMS)) {
            updateItems(restrictions);
        }
    }
}
 
private ArrayList<RestrictionEntry> initRestrictions(Context context) {
    ArrayList<RestrictionEntry> newRestrictions = new ArrayList<>();
    Resources res = context.getResources();

    RestrictionEntry reBoolean = new RestrictionEntry(KEY_BOOLEAN, false);
    populateBooleanEntry(res, reBoolean);
    newRestrictions.add(reBoolean);

    RestrictionEntry reSingleChoice = new RestrictionEntry(KEY_CHOICE, (String) null);
    populateChoiceEntry(res, reSingleChoice);
    newRestrictions.add(reSingleChoice);

    RestrictionEntry reMultiSelect = new RestrictionEntry(KEY_MULTI_SELECT, (String[]) null);
    populateMultiEntry(res, reMultiSelect);
    newRestrictions.add(reMultiSelect);

    return newRestrictions;
}
 
源代码9 项目: bitmask_android   文件: GetRestrictionReceiver.java
@Override
public void onReceive(final Context context, Intent intent) {
    final PendingResult result = goAsync();

    new Thread() {
        @Override
        public void run() {
            final Bundle extras = new Bundle();

            ArrayList<RestrictionEntry> restrictionEntries = initRestrictions(context);

            extras.putParcelableArrayList(Intent.EXTRA_RESTRICTIONS_LIST, restrictionEntries);
            result.setResult(Activity.RESULT_OK,null,extras);
            result.finish();
        }
    }.run();
}
 
/**
 * Loads the restrictions for the AppRestrictionSchema sample.
 *
 * @param activity The activity
 */
private void loadRestrictions(Activity activity) {
    RestrictionsManager manager =
            (RestrictionsManager) activity.getSystemService(Context.RESTRICTIONS_SERVICE);
    List<RestrictionEntry> restrictions =
            manager.getManifestRestrictions(Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA);
    SharedPreferences prefs = activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE);
    for (RestrictionEntry restriction : restrictions) {
        String key = restriction.getKey();
        if (RESTRICTION_KEY_SAY_HELLO.equals(key)) {
            updateCanSayHello(prefs.getBoolean(RESTRICTION_KEY_SAY_HELLO,
                    restriction.getSelectedState()));
        } else if (RESTRICTION_KEY_MESSAGE.equals(key)) {
            updateMessage(prefs.getString(RESTRICTION_KEY_MESSAGE,
                    restriction.getSelectedString()));
        } else if (RESTRICTION_KEY_NUMBER.equals(key)) {
            updateNumber(prefs.getInt(RESTRICTION_KEY_NUMBER,
                    restriction.getIntValue()));
        } else if (RESTRICTION_KEY_RANK.equals(key)) {
            updateRank(activity, restriction.getChoiceValues(),
                    prefs.getString(RESTRICTION_KEY_RANK, restriction.getSelectedString()));
        } else if (RESTRICTION_KEY_APPROVALS.equals(key)) {
            updateApprovals(activity, restriction.getChoiceValues(),
                    TextUtils.split(prefs.getString(RESTRICTION_KEY_APPROVALS,
                                    TextUtils.join(DELIMETER,
                                            restriction.getAllSelectedStrings())),
                            DELIMETER));
        } else if (BUNDLE_SUPPORTED && RESTRICTION_KEY_ITEMS.equals(key)) {
            String itemsString = prefs.getString(RESTRICTION_KEY_ITEMS, "");
            HashMap<String, String> items = new HashMap<>();
            for (String itemString : TextUtils.split(itemsString, DELIMETER)) {
                String[] strings = itemString.split(SEPARATOR, 2);
                items.put(strings[0], strings[1]);
            }
            updateItems(activity, items);
        }
    }
}
 
private void updateCanSayHello(RestrictionEntry entry, Bundle restrictions) {
    boolean canSayHello;
    if (restrictions == null || !restrictions.containsKey(KEY_CAN_SAY_HELLO)) {
        canSayHello = entry.getSelectedState();
    } else {
        canSayHello = restrictions.getBoolean(KEY_CAN_SAY_HELLO);
    }
    mTextSayHello.setText(canSayHello ?
            R.string.explanation_can_say_hello_true :
            R.string.explanation_can_say_hello_false);
    mButtonSayHello.setEnabled(canSayHello);
}
 
private void updateMessage(RestrictionEntry entry, Bundle restrictions) {
    if (restrictions == null || !restrictions.containsKey(KEY_MESSAGE)) {
        mMessage = entry.getSelectedString();
    } else {
        mMessage = restrictions.getString(KEY_MESSAGE);
    }
}
 
private void updateNumber(RestrictionEntry entry, Bundle restrictions) {
    int number;
    if (restrictions == null || !restrictions.containsKey(KEY_NUMBER)) {
        number = entry.getIntValue();
    } else {
        number = restrictions.getInt(KEY_NUMBER);
    }
    mTextNumber.setText(getString(R.string.your_number, number));
}
 
private void updateRank(RestrictionEntry entry, Bundle restrictions) {
    String rank;
    if (restrictions == null || !restrictions.containsKey(KEY_RANK)) {
        rank = entry.getSelectedString();
    } else {
        rank = restrictions.getString(KEY_RANK);
    }
    mTextRank.setText(getString(R.string.your_rank, rank));
}
 
private void updateApprovals(RestrictionEntry entry, Bundle restrictions) {
    String[] approvals;
    if (restrictions == null || !restrictions.containsKey(KEY_APPROVALS)) {
        approvals = entry.getAllSelectedStrings();
    } else {
        approvals = restrictions.getStringArray(KEY_APPROVALS);
    }
    String text;
    if (approvals == null || approvals.length == 0) {
        text = getString(R.string.none);
    } else {
        text = TextUtils.join(", ", approvals);
    }
    mTextApprovals.setText(getString(R.string.approvals_you_have, text));
}
 
public static void populateChoiceEntry(Resources res, RestrictionEntry reSingleChoice) {
    String[] choiceEntries = res.getStringArray(R.array.choice_entry_entries);
    String[] choiceValues = res.getStringArray(R.array.choice_entry_values);
    if (reSingleChoice.getSelectedString() == null) {
        reSingleChoice.setSelectedString(choiceValues[0]);
    }
    reSingleChoice.setTitle(res.getString(R.string.choice_entry_title));
    reSingleChoice.setChoiceEntries(choiceEntries);
    reSingleChoice.setChoiceValues(choiceValues);
    reSingleChoice.setType(RestrictionEntry.TYPE_CHOICE);
}
 
public static void populateMultiEntry(Resources res, RestrictionEntry reMultiSelect) {
    String[] multiEntries = res.getStringArray(R.array.multi_entry_entries);
    String[] multiValues = res.getStringArray(R.array.multi_entry_values);
    if (reMultiSelect.getAllSelectedStrings() == null) {
        reMultiSelect.setAllSelectedStrings(new String[0]);
    }
    reMultiSelect.setTitle(res.getString(R.string.multi_entry_title));
    reMultiSelect.setChoiceEntries(multiEntries);
    reMultiSelect.setChoiceValues(multiValues);
    reMultiSelect.setType(RestrictionEntry.TYPE_MULTI_SELECT);
}
 
@TargetApi(VERSION_CODES.M)
private void addBundleArrayToRestrictions(List<RestrictionEntry> restrictionEntries,
        String key, Parcelable[] value) {
    int length = value.length;
    RestrictionEntry[] entriesArray = new RestrictionEntry[length];
    for (int i = 0; i < entriesArray.length; ++i) {
        entriesArray[i] = RestrictionEntry.createBundleEntry(key,
                convertBundleToRestrictions((Bundle) value[i]));
    }
    restrictionEntries.add(RestrictionEntry.createBundleArrayEntry(key, entriesArray));
}
 
@TargetApi(VERSION_CODES.M)
private void updateRestrictionEntryFromResultIntent(RestrictionEntry restrictionEntry,
        Intent intent) {
    switch (restrictionEntry.getType()) {
        case RestrictionEntry.TYPE_BOOLEAN:
            restrictionEntry.setSelectedState(intent.getBooleanExtra(RESULT_VALUE, false));
            break;
        case RestrictionEntry.TYPE_INTEGER:
            restrictionEntry.setIntValue(intent.getIntExtra(RESULT_VALUE, 0));
            break;
        case RestrictionEntry.TYPE_STRING:
            restrictionEntry.setSelectedString(intent.getStringExtra(RESULT_VALUE));
            break;
        case RestrictionEntry.TYPE_MULTI_SELECT:
            restrictionEntry.setAllSelectedStrings(intent.getStringArrayExtra(RESULT_VALUE));
            break;
        case RestrictionEntry.TYPE_BUNDLE: {
            Bundle bundle = intent.getBundleExtra(RESULT_VALUE);
            restrictionEntry.setRestrictions(convertBundleToRestrictions(bundle));
            break;
        }
        case RestrictionEntry.TYPE_BUNDLE_ARRAY: {
            Parcelable[] bundleArray = intent.getParcelableArrayExtra(RESULT_VALUE);
            RestrictionEntry[] restrictionEntryArray = new RestrictionEntry[bundleArray.length];
            for (int i = 0; i< bundleArray.length; i++) {
                restrictionEntryArray[i] = RestrictionEntry.createBundleEntry(String.valueOf(i),
                        convertBundleToRestrictions((Bundle) bundleArray[i]));
            }
            restrictionEntry.setRestrictions(restrictionEntryArray);
            break;
        }
    }
}
 
private void loadManifestAppRestrictions(String pkgName) {
    if (!TextUtils.isEmpty(pkgName)) {
        List<RestrictionEntry> manifestRestrictions = null;
        try {
            manifestRestrictions = mRestrictionsManager.getManifestRestrictions(pkgName);
            convertTypeChoiceAndNullToString(manifestRestrictions);
        } catch (NullPointerException e) {
            // This means no default restrictions.
        }
        if (manifestRestrictions != null) {
            loadAppRestrictionsList(manifestRestrictions.toArray(new RestrictionEntry[0]));
        }
    }
}
 
/**
 * TODO (b/23378519): Remove this method and add support for type choice and null.
 */
private void convertTypeChoiceAndNullToString(List<RestrictionEntry> restrictionEntries) {
    for (RestrictionEntry entry : restrictionEntries) {
        if (entry.getType() == RestrictionEntry.TYPE_CHOICE ||
                entry.getType() == RestrictionEntry.TYPE_NULL) {
            entry.setType(RestrictionEntry.TYPE_STRING);
        }
    }
}
 
源代码22 项目: android-testdpc   文件: RestrictionManagerCompat.java
private static Bundle addRestrictionToBundle(Bundle bundle, RestrictionEntry entry) {
    switch (entry.getType()) {
        case RestrictionEntry.TYPE_BOOLEAN:
            bundle.putBoolean(entry.getKey(), entry.getSelectedState());
            break;
        case RestrictionEntry.TYPE_CHOICE:
        case RestrictionEntry.TYPE_MULTI_SELECT:
            bundle.putStringArray(entry.getKey(), entry.getAllSelectedStrings());
            break;
        case RestrictionEntry.TYPE_INTEGER:
            bundle.putInt(entry.getKey(), entry.getIntValue());
            break;
        case RestrictionEntry.TYPE_STRING:
        case RestrictionEntry.TYPE_NULL:
            bundle.putString(entry.getKey(), entry.getSelectedString());
            break;
        case RestrictionEntry.TYPE_BUNDLE:
            addBundleRestrictionToBundle(bundle, entry);
            break;
        case RestrictionEntry.TYPE_BUNDLE_ARRAY:
            addBundleArrayRestrictionToBundle(bundle, entry);
            break;
        default:
            throw new IllegalArgumentException(
                    "Unsupported restrictionEntry type: " + entry.getType());
    }
    return bundle;
}
 
源代码23 项目: android-testdpc   文件: RestrictionManagerCompat.java
@TargetApi(VERSION_CODES.M)
private static void addBundleRestrictionToBundle(Bundle bundle, RestrictionEntry entry) {
    if (Util.SDK_INT >= VERSION_CODES.M) {
        RestrictionEntry[] restrictions = entry.getRestrictions();
        Bundle childBundle = convertRestrictionsToBundle(Arrays.asList(restrictions));
        bundle.putBundle(entry.getKey(), childBundle);
    } else {
        Log.w(TAG, "addBundleRestrictionToBundle is called in pre-M");
    }
}
 
private void updateCanSayHello(RestrictionEntry entry, Bundle restrictions) {
    boolean canSayHello;
    if (restrictions == null || !restrictions.containsKey(KEY_CAN_SAY_HELLO)) {
        canSayHello = entry.getSelectedState();
    } else {
        canSayHello = restrictions.getBoolean(KEY_CAN_SAY_HELLO);
    }
    mTextSayHello.setText(canSayHello ?
            R.string.explanation_can_say_hello_true :
            R.string.explanation_can_say_hello_false);
    mButtonSayHello.setEnabled(canSayHello);
}
 
private void updateMessage(RestrictionEntry entry, Bundle restrictions) {
    if (restrictions == null || !restrictions.containsKey(KEY_MESSAGE)) {
        mMessage = entry.getSelectedString();
    } else {
        mMessage = restrictions.getString(KEY_MESSAGE);
    }
}
 
private void updateNumber(RestrictionEntry entry, Bundle restrictions) {
    int number;
    if (restrictions == null || !restrictions.containsKey(KEY_NUMBER)) {
        number = entry.getIntValue();
    } else {
        number = restrictions.getInt(KEY_NUMBER);
    }
    mTextNumber.setText(getString(R.string.your_number, number));
}
 
private void updateRank(RestrictionEntry entry, Bundle restrictions) {
    String rank;
    if (restrictions == null || !restrictions.containsKey(KEY_RANK)) {
        rank = entry.getSelectedString();
    } else {
        rank = restrictions.getString(KEY_RANK);
    }
    mTextRank.setText(getString(R.string.your_rank, rank));
}
 
private void updateApprovals(RestrictionEntry entry, Bundle restrictions) {
    String[] approvals;
    if (restrictions == null || !restrictions.containsKey(KEY_APPROVALS)) {
        approvals = entry.getAllSelectedStrings();
    } else {
        approvals = restrictions.getStringArray(KEY_APPROVALS);
    }
    String text;
    if (approvals == null || approvals.length == 0) {
        text = getString(R.string.none);
    } else {
        text = TextUtils.join(", ", approvals);
    }
    mTextApprovals.setText(getString(R.string.approvals_you_have, text));
}
 
/**
 * Loads the restrictions for the AppRestrictionSchema sample.
 *
 * @param activity The activity
 */
private void loadRestrictions(Activity activity) {
    RestrictionsManager manager =
            (RestrictionsManager) activity.getSystemService(Context.RESTRICTIONS_SERVICE);
    List<RestrictionEntry> restrictions =
            manager.getManifestRestrictions(Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA);
    SharedPreferences prefs = activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE);
    for (RestrictionEntry restriction : restrictions) {
        String key = restriction.getKey();
        if (RESTRICTION_KEY_SAY_HELLO.equals(key)) {
            updateCanSayHello(prefs.getBoolean(RESTRICTION_KEY_SAY_HELLO,
                    restriction.getSelectedState()));
        } else if (RESTRICTION_KEY_MESSAGE.equals(key)) {
            updateMessage(prefs.getString(RESTRICTION_KEY_MESSAGE,
                    restriction.getSelectedString()));
        } else if (RESTRICTION_KEY_NUMBER.equals(key)) {
            updateNumber(prefs.getInt(RESTRICTION_KEY_NUMBER,
                    restriction.getIntValue()));
        } else if (RESTRICTION_KEY_RANK.equals(key)) {
            updateRank(activity, restriction.getChoiceValues(),
                    prefs.getString(RESTRICTION_KEY_RANK, restriction.getSelectedString()));
        } else if (RESTRICTION_KEY_APPROVALS.equals(key)) {
            updateApprovals(activity, restriction.getChoiceValues(),
                    TextUtils.split(prefs.getString(RESTRICTION_KEY_APPROVALS,
                                    TextUtils.join(DELIMETER,
                                            restriction.getAllSelectedStrings())),
                            DELIMETER));
        } else if (BUNDLE_SUPPORTED && RESTRICTION_KEY_ITEMS.equals(key)) {
            String itemsString = prefs.getString(RESTRICTION_KEY_ITEMS, "");
            HashMap<String, String> items = new HashMap<>();
            for (String itemString : TextUtils.split(itemsString, DELIMETER)) {
                String[] strings = itemString.split(SEPARATOR, 2);
                items.put(strings[0], strings[1]);
            }
            updateItems(activity, items);
        }
    }
}
 
public static void populateChoiceEntry(Resources res, RestrictionEntry reSingleChoice) {
    String[] choiceEntries = res.getStringArray(R.array.choice_entry_entries);
    String[] choiceValues = res.getStringArray(R.array.choice_entry_values);
    if (reSingleChoice.getSelectedString() == null) {
        reSingleChoice.setSelectedString(choiceValues[0]);
    }
    reSingleChoice.setTitle(res.getString(R.string.choice_entry_title));
    reSingleChoice.setChoiceEntries(choiceEntries);
    reSingleChoice.setChoiceValues(choiceValues);
    reSingleChoice.setType(RestrictionEntry.TYPE_CHOICE);
}