/frameworks/support/navigation/runtime/ktx/src/androidTest/java/androidx/navigation/ |
H A D | ActivityTest.kt | 31 @get:Rule val activityRule = ActivityTestRule<TestActivity>(TestActivity::class.java) 32 private val view get() = activityRule.activity.findViewById<View>(VIEW_ID) 35 val navController = NavController(activityRule.activity) 38 val foundNavController = activityRule.activity.findNavController(VIEW_ID) 64 private const val VIEW_ID = 1 65 private const val INVALID_VIEW_ID = 2
|
/frameworks/support/room/compiler/src/main/kotlin/androidx/room/processor/ |
H A D | DeletionMethodProcessor.kt | 26 val containing: DeclaredType, 27 val executableElement: ExecutableElement) { 28 val context = baseContext.fork(executableElement) 31 val delegate = ShortcutMethodProcessor(context, containing, executableElement) 34 val returnTypeName = delegate.extractReturnType().typeName() 41 val (entities, params) = delegate.extractParams(
|
/frameworks/support/room/compiler/src/main/kotlin/androidx/room/solver/ |
H A D | CodeGenScope.kt | 26 class CodeGenScope(val writer: ClassWriter) { 30 const val TMP_VAR_DEFAULT_PREFIX = "_tmp" 31 const val CLASS_PROPERTY_PREFIX = "__" 55 val index = tmpVarIndices.getOrElse(prefix) { 0 } 56 val result = _tmpVar(prefix, index) 67 val forked = CodeGenScope(writer)
|
/frameworks/av/media/libstagefright/codecs/amrnb/enc/src/ |
H A D | set_sign.cpp | 177 Word16 val, min; 183 val = dn[i]; 185 if (val >= 0) { 189 val = negate(val); 191 dn[i] = val; // modify dn[] according to the fixed sign 192 dn2[i] = val; 206 val = sub(dn2[j], min); 208 if (val < 0) 252 Word16 val, mi local 498 Word16 val; local [all...] |
/frameworks/support/room/compiler/src/main/kotlin/androidx/room/writer/ |
H A D | ClassWriter.kt | 35 abstract class ClassWriter(private val className: ClassName) { 36 private val sharedFieldSpecs = mutableMapOf<String, FieldSpec>() 37 private val sharedMethodSpecs = mutableMapOf<String, MethodSpec>() 38 private val sharedFieldNames = mutableSetOf<String>() 39 private val sharedMethodNames = mutableSetOf<String>() 44 val builder = createTypeSpecBuilder() 55 val suppressSpec = AnnotationSpec.builder(SuppressWarnings::class.typeName()).addMember( 65 val generatedAnnotationAvailable = processingEnv 69 val className = ClassName.get(GENERATED_PACKAGE, GENERATED_NAME) 70 val generatedAnnotationSpe [all...] |
H A D | DaoWriter.kt | 57 class DaoWriter(val dao: Dao, val processingEnv: ProcessingEnvironment) 59 private val declaredDao = MoreTypes.asDeclared(dao.element.asType()) 63 val dbField: FieldSpec = FieldSpec 77 val builder = TypeSpec.classBuilder(dao.implTypeName) 83 val groupedDeleteUpdate = dao.queryMethods 87 val preparedDeleteOrUpdateQueries = groupedDeleteUpdate[false] ?: emptyList() 89 val oneOffDeleteOrUpdateQueries = groupedDeleteUpdate[true] ?: emptyList() 90 val shortcutMethods = createInsertionMethods() + 102 val dbPara [all...] |
H A D | TableInfoValidationWriter.kt | 36 class TableInfoValidationWriter(val entity: Entity) { 38 val suffix = entity.tableName.stripNonJava().capitalize() 39 val expectedInfoVar = scope.getTmpVar("_info$suffix") 41 val columnListVar = scope.getTmpVar("_columns$suffix") 42 val columnListType = ParameterizedTypeName.get(HashMap::class.typeName(), 56 val foreignKeySetVar = scope.getTmpVar("_foreignKeys$suffix") 57 val foreignKeySetType = ParameterizedTypeName.get(HashSet::class.typeName(), 62 val myColumnNames = it.childFields 64 val refColumnNames = it.parentColumns 78 val indicesSetVa [all...] |
/frameworks/support/room/compiler/src/test/kotlin/androidx/room/testing/ |
H A D | test_util.kt | 50 val USER by lazy { 53 val USER_TYPE_NAME by lazy { 56 val BOOK by lazy { 59 val NOT_AN_ENTITY by lazy { 63 val NOT_AN_ENTITY_TYPE_NAME by lazy { 67 val MULTI_PKEY_ENTITY by lazy { 70 val LIVE_DATA by lazy { 73 val COMPUTABLE_LIVE_DATA by lazy { 77 val PUBLISHER by lazy { 81 val FLOWABL [all...] |
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/ |
H A D | PointTest.kt | 26 val (x, y) = Point(2, 3) 32 val (x, y) = PointF(2.0f, 3.0f) 38 val (x, y) = Point(2, 3) + 2 44 val (x, y) = PointF(2.0f, 3.0f) + 2.0f 50 val (x, y) = Point(2, 3) + Point(1, 2) 56 val (x, y) = PointF(2.0f, 3.0f) + PointF(1.0f, 2.0f) 62 val (x, y) = Point(2, 3) - 2 68 val (x, y) = PointF(2.0f, 3.0f) - 2.0f 74 val (x, y) = Point(2, 3) - Point(1, 2) 80 val ( [all...] |
H A D | BitmapTest.kt | 27 val bitmap = createBitmap(7, 9) 34 val bitmap = createBitmap(7, 9, config = Bitmap.Config.RGB_565) 40 val colorSpace = ColorSpace.get(ColorSpace.Named.ADOBE_RGB) 41 val bitmap = createBitmap(7, 9, colorSpace = colorSpace) 46 val b = createBitmap(7, 9).scale(3, 5) 52 val p = createBitmap(2, 2).applyCanvas { 60 val b = createBitmap(2, 2).applyCanvas { 67 val b = createBitmap(2, 2)
|
H A D | PictureTest.kt | 26 val p = Picture().record(1, 1) { 29 val v = createBitmap(1, 1).applyCanvas {
|
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/text/ |
H A D | SpannableStringTest.kt | 32 val s = "Hello, World".toSpannable() 34 val bold = StyleSpan(BOLD) 41 val s = "Hello, World".toSpannable() 42 val bold = StyleSpan(BOLD) 50 val s = "Hello, World".toSpannable() 59 val s = "Hello, World".toSpannable() 63 val spans = s.getSpans<Any>() 65 val bold = spans.filterIsInstance<StyleSpan>().single() 69 val underline = spans.filterIsInstance<UnderlineSpan>().single() 75 val [all...] |
/frameworks/support/jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/ |
H A D | CoreRemapperImpl.kt | 32 private val context: TransformationContext, 37 const val TAG = "CoreRemapperImpl" 40 private val typesMap = context.config.typesMap 45 val classRemapper = ClassRemapper(visitor, CustomRemapper(this)) 48 val result = context.typeRewriter.rewriteType(type) 59 val type = JavaType.fromDotVersion(value) 64 val mappedType = context.config.typesMap.mapType(type) 74 val subTypeResult = context.config.typesMap.mapType(type.getParentType()) 76 val result = subTypeResult.toDotNotation() + '.' + value.substringAfterLast('.') 84 val rewrittenTyp [all...] |
/frameworks/support/room/compiler/src/test/kotlin/androidx/room/solver/ |
H A D | TypeAssignmentTest.kt | 33 private val TEST_OBJECT = JavaFileObjects.forSourceString("foo.bar.MyObject", 54 val testObject = typeElement("foo.bar.MyObject") 55 val string = testObject.getField(processingEnv, "mString") 56 val integer = testObject.getField(processingEnv, "mInteger") 66 val testObject = typeElement("foo.bar.MyObject") 67 val set = testObject.getField(processingEnv, "mSet").asType() 68 val hashSet = testObject.getField(processingEnv, "mHashSet").asType() 89 val testObject = typeElement("foo.bar.MyObject") 90 val set = testObject.getField(processingEnv, "mSet").asType() 91 val varianceSe [all...] |
/frameworks/support/paging/common/src/test/java/androidx/paging/ |
H A D | ItemKeyedDataSourceTest.kt | 40 val receiver = mock(PageResult.Receiver::class.java) as PageResult.Receiver<Item> 42 val captor = ArgumentCaptor.forClass(PageResult::class.java) 56 val dataSource = ItemDataSource() 57 val result = loadInitial(dataSource, dataSource.getKey(ITEMS_BY_NAME_ID[49]), 10, true) 66 val dataSource = ItemDataSource(items = ITEMS_BY_NAME_ID.subList(0, 1)) 69 val result = loadInitial(dataSource, dataSource.getKey(ITEMS_BY_NAME_ID[0]), 20, true) 78 val dataSource = ItemDataSource() 81 val key = dataSource.getKey(ITEMS_BY_NAME_ID.last()) 82 val result = loadInitial(dataSource, key, 20, true) 91 val dataSourc [all...] |
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
H A D | BrightnessUtils.java | 48 * @param val The slider value. 53 public static final int convertGammaToLinear(int val, int min, int max) { argument 54 final float normalizedVal = MathUtils.norm(0, GAMMA_SPACE_MAX, val); 84 * @param val The brightness setting value. 89 public static final int convertLinearToGamma(int val, int min, int max) { argument 91 final float normalizedVal = MathUtils.norm(min, max, val) * 12;
|
/frameworks/base/tools/sdkparcelables/src/com/android/sdkparcelables/ |
H A D | Main.kt | 30 val zipFileName = args[0] 31 val aidlFileName = args[1] 33 val zipFile: ZipFile 42 val ancestorCollector = AncestorCollector(Opcodes.ASM6, null) 46 val reader = ClassReader(zipFile.getInputStream(entry)) 52 val parcelables = ParcelableDetector.ancestorsToParcelables(ancestorCollector.ancestors) 55 val outFile = File(aidlFileName) 56 val outWriter = outFile.bufferedWriter()
|
/frameworks/data-binding/compiler/src/main/kotlin/android/databinding/tool/expr/ |
H A D | ExprWriters.kt | 39 val myExpr = expr 42 val localize = myExpr.shouldLocalizeInCallbacks() && !myExpr.isVariable() 44 val eligible = localize || (myExpr is MethodCallExpr || (myExpr is FieldAccessExpr && myExpr.getter.type == Callable.Type.METHOD)) 46 val assign = if (localize) { 54 val chosen = if (knownValues[myExpr.pred]!!) myExpr.ifTrue else myExpr.ifFalse 71 val myTrue = trueBranch 72 val myFalse = falseBranch 74 val condition = with(myTrue.conditional) {
|
/frameworks/native/libs/binder/ |
H A D | Debug.cpp | 60 static inline char makehexdigit(uint32_t val) argument 62 return "0123456789abcdef"[val&0xF]; 65 static char* appendhexnum(uint32_t val, char* out) argument 68 *out++ = makehexdigit( val>>i ); 234 const unsigned char val = *(pos+startIndex-index); local 235 *c++ = makehexdigit(val>>4); 236 *c++ = makehexdigit(val); 251 const unsigned char val = *(pos+startIndex-index); local 252 *c++ = makehexdigit(val>>4); 253 *c++ = makehexdigit(val); 269 const unsigned char val = pos[index]; local [all...] |
/frameworks/support/collection/ktx/src/test/java/androidx/collection/ |
H A D | ArraySetTest.kt | 25 val set = arraySetOf<String>() 30 val set = arraySetOf("foo", "bar", "baz")
|
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/util/ |
H A D | TimingLoggerTest.kt | 25 val called = arrayOf(false, false, false) 27 val timingLogger = TimingLogger("TAG", "methodA")
|
/frameworks/support/jetifier/jetifier/preprocessor/src/main/kotlin/com/android/tools/build/jetifier/preprocessor/ |
H A D | ConfigGenerator.kt | 29 private const val LEGAL_NOTICE = 44 private const val GEN_NOTICE = 55 val mapper = LibraryMapGenerator(config) 59 val library = Archive.Builder.extract(fileInDir) 63 val library = Archive.Builder.extract(it) 68 val map = mapper.generateMap().mergeWith(config.typesMap) 70 val newConfig = config.setNewMap(map) 76 val sb = StringBuilder()
|
/frameworks/support/jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/transform/ |
H A D | TransformationContext.kt | 30 val config: Config, 31 val rewritingSupportLib: Boolean = false, 32 val isInReversedMode: Boolean = false, 36 val useFallbackIfTypeIsMissing: Boolean = true, 37 val versions: DependencyVersions = DependencyVersions.EMPTY 41 val packagePrefixPattern = Pattern.compile( 44 val typeRewriter: TypeRewriter = TypeRewriter(config, useFallbackIfTypeIsMissing) 49 val ignorePomVersionCheck = true
|
/frameworks/support/navigation/common/ktx/src/androidTest/java/androidx/navigation/ |
H A D | NavGraphBuilderTest.kt | 33 private val provider = TestNavigatorProvider(InstrumentationRegistry.getTargetContext()) 37 val graph = provider.navigation(startDestination = DESTINATION_ID) { 46 val graph = provider.navigation(startDestination = DESTINATION_ID) { 57 val graph = provider.navigation(startDestination = DESTINATION_ID) { 58 val destination = NavDestination(provider[TestNavigator::class]).apply { 77 val graph = provider.navigation(startDestination = DESTINATION_ID) { 87 private const val DESTINATION_ID = 1 88 private const val SECOND_DESTINATION_ID = 2
|
/frameworks/support/navigation/fragment/ktx/src/androidTest/java/androidx/navigation/fragment/ |
H A D | FragmentNavigatorDestinationBuilderTest.kt | 37 val activityRule = ActivityTestRule<TestActivity>(TestActivity::class.java) 38 private val fragmentManager get() = activityRule.activity.supportFragmentManager 42 val navHostFragment = NavHostFragment() 46 val graph = navHostFragment.createGraph(startDestination = DESTINATION_ID) { 58 val navHostFragment = NavHostFragment() 62 val graph = navHostFragment.createGraph(startDestination = DESTINATION_ID) { 77 private const val DESTINATION_ID = 1 78 private const val LABEL = "Test"
|