use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.
the class BluetoothChooserDialog method notifyAdapterTurnedOff.
@VisibleForTesting
@CalledByNative
void notifyAdapterTurnedOff() {
SpannableString adapterOffMessage = SpanApplier.applySpans(mActivity.getString(R.string.bluetooth_adapter_off), new SpanInfo("<link>", "</link>", new BluetoothClickableSpan(LinkType.ADAPTER_OFF, mActivity)));
SpannableString adapterOffStatus = SpanApplier.applySpans(mActivity.getString(R.string.bluetooth_adapter_off_help), new SpanInfo("<link>", "</link>", new BluetoothClickableSpan(LinkType.ADAPTER_OFF_HELP, mActivity)));
mItemChooserDialog.setErrorState(adapterOffMessage, adapterOffStatus);
}
use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.
the class AutofillKeyboardAccessoryBridge method init.
/**
* Initializes this object.
* This function should be called at most one time.
* @param nativeAutofillKeyboardAccessory Handle to the native counterpart.
* @param windowAndroid The window on which to show the suggestions.
*/
@CalledByNative
private void init(long nativeAutofillKeyboardAccessory, WindowAndroid windowAndroid) {
if (windowAndroid == null || windowAndroid.getActivity().get() == null) {
nativeViewDismissed(nativeAutofillKeyboardAccessory);
dismissed();
return;
}
mNativeAutofillKeyboardAccessory = nativeAutofillKeyboardAccessory;
mAccessoryView = new AutofillKeyboardAccessory(windowAndroid, this);
mContext = windowAndroid.getActivity().get();
}
use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.
the class AutofillPopupBridge method addToAutofillSuggestionArray.
/**
* @param array AutofillSuggestion array that should get a new suggestion added.
* @param index Index in the array where to place a new suggestion.
* @param label First line of the suggestion.
* @param sublabel Second line of the suggestion.
* @param iconId The resource ID for the icon associated with the suggestion, or 0 for no icon.
* @param suggestionId Identifier for the suggestion type.
* @param deletable Whether this item is deletable.
* @param isLabelMultiline Whether the label should be should over multiple lines.
*/
@CalledByNative
private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index, String label, String sublabel, int iconId, int suggestionId, boolean deletable, boolean isLabelMultiline) {
int drawableId = iconId == 0 ? DropdownItem.NO_ICON : ResourceId.mapToDrawableId(iconId);
array[index] = new AutofillSuggestion(label, sublabel, drawableId, suggestionId, deletable, isLabelMultiline);
}
use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.
the class AppBannerManager method fetchAppDetails.
/**
* Grabs package information for the banner asynchronously.
* @param url URL for the page that is triggering the banner.
* @param packageName Name of the package that is being advertised.
*/
@CalledByNative
private void fetchAppDetails(String url, String packageName, String referrer, int iconSizeInDp) {
if (sAppDetailsDelegate == null)
return;
Context context = ContextUtils.getApplicationContext();
int iconSizeInPx = Math.round(context.getResources().getDisplayMetrics().density * iconSizeInDp);
sAppDetailsDelegate.getAppDetailsAsynchronously(createAppDetailsObserver(), url, packageName, referrer, iconSizeInPx);
}
use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.
the class BookmarkBridge method addToBookmarkIdListWithDepth.
@CalledByNative
private static void addToBookmarkIdListWithDepth(List<BookmarkId> folderList, long id, int type, List<Integer> depthList, int depth) {
folderList.add(new BookmarkId(id, type));
depthList.add(depth);
}
Aggregations