1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.robolectric.nativeruntime; 18 19 /** 20 * Native methods for TextRunShaper JNI registration. 21 * 22 * <p>Native method signatures are derived from 23 * https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/graphics/text/TextRunShaper.java 24 */ 25 public final class TextRunShaperNatives { 26 nativeShapeTextRun( char[] text, int start, int count, int contextStart, int contextCount, boolean isRtl, long nativePaint)27 public static native long nativeShapeTextRun( 28 char[] text, 29 int start, 30 int count, 31 int contextStart, 32 int contextCount, 33 boolean isRtl, 34 long nativePaint); 35 nativeShapeTextRun( String text, int start, int count, int contextStart, int contextCount, boolean isRtl, long nativePaint)36 public static native long nativeShapeTextRun( 37 String text, 38 int start, 39 int count, 40 int contextStart, 41 int contextCount, 42 boolean isRtl, 43 long nativePaint); 44 TextRunShaperNatives()45 private TextRunShaperNatives() {} 46 } 47