/developers/samples/android/ui/text/TextStyling-Java/app/src/androidTest/java/com/android/example/text/styling/renderer/ |
D | MarkdownBuilderTest.java | 51 SpannedString result = builder.markdownToSpans("Hello, world!"); in builder() local 52 assertEquals("Hello, world!", result.toString()); in builder() 57 SpannedString result = builder.markdownToSpans("Text"); in text() local 59 Object[] spans = result.getSpans(0, result.length(), Object.class); in text() 65 SpannedString result = builder.markdownToSpans("Text\n> Quote"); in textWithQuote() local 67 assertEquals("Text\nQuote", result.toString()); in textWithQuote() 68 Object[] spans = result.getSpans(0, result.length(), Object.class); in textWithQuote() 73 assertEquals(5, result.getSpanStart(styleSpan)); in textWithQuote() 74 assertEquals(10, result.getSpanEnd(styleSpan)); in textWithQuote() 76 assertEquals(5, result.getSpanStart(leadingMarginSpan)); in textWithQuote() [all …]
|
/developers/samples/android/ui/text/TextStyling-Kotlin/app/src/androidTest/java/com/android/example/text/styling/renderer/ |
D | MarkdownBuilderTest.kt | 44 val result = builder.markdownToSpans("Hello, world!") in builder() constant 45 assertEquals("Hello, world!", result.toString()) in builder() 49 val result = builder.markdownToSpans("Text") in text() constant 51 val spans = result.getSpans<Any>(0, result.length, Any::class.java) in text() 56 val result = builder.markdownToSpans("Text\n> Quote") in textWithQuote() constant 58 assertEquals("Text\nQuote", result.toString()) in textWithQuote() 59 val spans = result.getSpans<Any>(0, result.length, Any::class.java) in textWithQuote() 64 assertEquals(5, result.getSpanStart(styleSpan).toLong()) in textWithQuote() 65 assertEquals(10, result.getSpanEnd(styleSpan).toLong()) in textWithQuote() 67 assertEquals(5, result.getSpanStart(leadingMarginSpan).toLong()) in textWithQuote() [all …]
|
/developers/build/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/ |
D | NetworkFragment.java | 163 Result result = null; in doInBackground() local 170 result = new Result(resultString); in doInBackground() 175 result = new Result(e); in doInBackground() 178 return result; in doInBackground() 196 protected void onPostExecute(Result result) { in onPostExecute() argument 197 if (result != null && mCallback != null) { in onPostExecute() 198 if (result.mException != null) { in onPostExecute() 199 mCallback.updateFromDownload(result.mException.getMessage()); in onPostExecute() 200 } else if (result.mResultValue != null) { in onPostExecute() 201 mCallback.updateFromDownload(result.mResultValue); in onPostExecute() [all …]
|
/developers/samples/android/connectivity/network/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/ |
D | NetworkFragment.java | 163 Result result = null; in doInBackground() local 170 result = new Result(resultString); in doInBackground() 175 result = new Result(e); in doInBackground() 178 return result; in doInBackground() 196 protected void onPostExecute(Result result) { in onPostExecute() argument 197 if (result != null && mCallback != null) { in onPostExecute() 198 if (result.mException != null) { in onPostExecute() 199 mCallback.updateFromDownload(result.mException.getMessage()); in onPostExecute() 200 } else if (result.mResultValue != null) { in onPostExecute() 201 mCallback.updateFromDownload(result.mResultValue); in onPostExecute() [all …]
|
/developers/samples/android/deprecated/wearable/wear/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/ |
D | ElizaResponder.java | 117 String result = ""; in elzTalk() local 160 result += question; in elzTalk() 161 if (result.endsWith("*")) { in elzTalk() 162 result = result.substring(0, result.length() - 1); in elzTalk() 163 result += " " + afterKeyword; in elzTalk() 166 return result; in elzTalk()
|
/developers/build/prebuilts/gradle/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/ |
D | ElizaResponder.java | 117 String result = ""; in elzTalk() local 160 result += question; in elzTalk() 161 if (result.endsWith("*")) { in elzTalk() 162 result = result.substring(0, result.length() - 1); in elzTalk() 163 result += " " + afterKeyword; in elzTalk() 166 return result; in elzTalk()
|
/developers/samples/android/renderScript/BasicRenderScript/Application/src/main/rs/ |
D | saturation.rs | 31 float3 result = dot(f4.rgb, gMonoMult); 32 result = mix(result, f4.rgb, saturationValue); 34 return rsPackColorTo8888(result);
|
/developers/build/prebuilts/gradle/BasicRenderScript/Application/src/main/rs/ |
D | saturation.rs | 31 float3 result = dot(f4.rgb, gMonoMult); 32 result = mix(result, f4.rgb, saturationValue); 34 return rsPackColorTo8888(result);
|
/developers/build/prebuilts/gradle/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/ |
D | AutofillDataset.java | 73 int result = mId.hashCode(); in hashCode() local 74 result = 31 * result + mDatasetName.hashCode(); in hashCode() 75 result = 31 * result + mPackageName.hashCode(); in hashCode() 76 return result; in hashCode()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/ |
D | AutofillDataset.java | 73 int result = mId.hashCode(); in hashCode() local 74 result = 31 * result + mDatasetName.hashCode(); in hashCode() 75 result = 31 * result + mPackageName.hashCode(); in hashCode() 76 return result; in hashCode()
|
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/model/ |
D | Message.java | 142 int result = id != null ? id.hashCode() : 0; in hashCode() local 143 result = 31 * result + senderId.hashCode(); in hashCode() 144 result = 31 * result + (name != null ? name.hashCode() : 0); in hashCode() 145 result = 31 * result + (text != null ? text.hashCode() : 0); in hashCode() 146 result = 31 * result + (int) (sentTime ^ (sentTime >>> 32)); in hashCode() 147 return result; in hashCode()
|
D | Profile.java | 158 int result = id.hashCode(); in hashCode() local 159 result = 31 * result + (email != null ? email.hashCode() : 0); in hashCode() 160 result = 31 * result + name.hashCode(); in hashCode() 161 result = 31 * result + profileImageUri.hashCode(); in hashCode() 162 result = 31 * result + (lastUpdatedTime != null ? lastUpdatedTime.hashCode() : 0); in hashCode() 163 return result; in hashCode()
|
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/model/ |
D | Message.java | 142 int result = id != null ? id.hashCode() : 0; in hashCode() local 143 result = 31 * result + senderId.hashCode(); in hashCode() 144 result = 31 * result + (name != null ? name.hashCode() : 0); in hashCode() 145 result = 31 * result + (text != null ? text.hashCode() : 0); in hashCode() 146 result = 31 * result + (int) (sentTime ^ (sentTime >>> 32)); in hashCode() 147 return result; in hashCode()
|
D | Profile.java | 158 int result = id.hashCode(); in hashCode() local 159 result = 31 * result + (email != null ? email.hashCode() : 0); in hashCode() 160 result = 31 * result + name.hashCode(); in hashCode() 161 result = 31 * result + profileImageUri.hashCode(); in hashCode() 162 result = 31 * result + (lastUpdatedTime != null ? lastUpdatedTime.hashCode() : 0); in hashCode() 163 return result; in hashCode()
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/data/ |
D | Contact.kt | 69 var result = id.hashCode() in hashCode() variable 70 result = 31 * result + name.hashCode() in hashCode() 71 result = 31 * result + icon in hashCode() 72 return result in hashCode()
|
/developers/build/prebuilts/gradle/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/ |
D | AsyncTask.java | 334 private void postResultIfNotInvoked(Result result) { in postResultIfNotInvoked() argument 337 postResult(result); in postResultIfNotInvoked() 341 private Result postResult(Result result) { in postResult() argument 344 new AsyncTaskResult<Result>(this, result)); in postResult() 346 return result; in postResult() 398 protected void onPostExecute(Result result) { in onPostExecute() argument 429 protected void onCancelled(Result result) { in onCancelled() argument 653 private void finish(Result result) { in finish() argument 655 onCancelled(result); in finish() 657 onPostExecute(result); in finish() [all …]
|
/developers/samples/android/ui/graphics/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/ |
D | AsyncTask.java | 334 private void postResultIfNotInvoked(Result result) { in postResultIfNotInvoked() argument 337 postResult(result); in postResultIfNotInvoked() 341 private Result postResult(Result result) { in postResult() argument 344 new AsyncTaskResult<Result>(this, result)); in postResult() 346 return result; in postResult() 398 protected void onPostExecute(Result result) { in onPostExecute() argument 429 protected void onCancelled(Result result) { in onCancelled() argument 653 private void finish(Result result) { in finish() argument 655 onCancelled(result); in finish() 657 onPostExecute(result); in finish() [all …]
|
/developers/samples/android/common/src/java/com/example/android/common/media/ |
D | MediaCodecWrapper.java | 138 MediaCodecWrapper result = null; in fromVideoFormat() local 155 result = new MediaCodecWrapper(videoCodec); in fromVideoFormat() 159 return result; in fromVideoFormat() 187 boolean result = false; in writeSample() 214 result = true; in writeSample() 216 return result; in writeSample() 243 boolean result = false; in writeSample() 264 result = true; in writeSample() 266 return result; in writeSample() 280 boolean result = false; in peekSample() [all …]
|
/developers/build/prebuilts/gradle/BasicMediaDecoder/Application/src/main/java/com/example/android/common/media/ |
D | MediaCodecWrapper.java | 138 MediaCodecWrapper result = null; in fromVideoFormat() local 155 result = new MediaCodecWrapper(videoCodec); in fromVideoFormat() 159 return result; in fromVideoFormat() 187 boolean result = false; in writeSample() 214 result = true; in writeSample() 216 return result; in writeSample() 243 boolean result = false; in writeSample() 264 result = true; in writeSample() 266 return result; in writeSample() 280 boolean result = false; in peekSample() [all …]
|
/developers/build/prebuilts/gradle/MediaRecorder/Application/src/main/java/com/example/android/common/media/ |
D | MediaCodecWrapper.java | 138 MediaCodecWrapper result = null; in fromVideoFormat() local 155 result = new MediaCodecWrapper(videoCodec); in fromVideoFormat() 159 return result; in fromVideoFormat() 187 boolean result = false; in writeSample() 214 result = true; in writeSample() 216 return result; in writeSample() 243 boolean result = false; in writeSample() 264 result = true; in writeSample() 266 return result; in writeSample() 280 boolean result = false; in peekSample() [all …]
|
/developers/samples/android/deprecated/wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/wearable/findphone/ |
D | FindPhoneService.java | 75 DataItemBuffer result = Wearable.DataApi.getDataItems(mGoogleApiClient).await(); in onHandleIntent() local 77 if (result.getStatus().isSuccess()) { in onHandleIntent() 78 if (result.getCount() == 1) { in onHandleIntent() 79 alarmOn = DataMap.fromByteArray(result.get(0).getData()) in onHandleIntent() 84 + "\tActual: " + result.getCount()); in onHandleIntent() 90 result.release(); in onHandleIntent() 122 public void onConnectionFailed(ConnectionResult result) { in onConnectionFailed() argument
|
/developers/build/prebuilts/gradle/FindMyPhone/Wearable/src/main/java/com/example/android/wearable/findphone/ |
D | FindPhoneService.java | 75 DataItemBuffer result = Wearable.DataApi.getDataItems(mGoogleApiClient).await(); in onHandleIntent() local 77 if (result.getStatus().isSuccess()) { in onHandleIntent() 78 if (result.getCount() == 1) { in onHandleIntent() 79 alarmOn = DataMap.fromByteArray(result.get(0).getData()) in onHandleIntent() 84 + "\tActual: " + result.getCount()); in onHandleIntent() 90 result.release(); in onHandleIntent() 122 public void onConnectionFailed(ConnectionResult result) { in onConnectionFailed() argument
|
/developers/samples/android/connectivity/nfc/CardEmulation/Application/tests/src/com/example/android/cardemulation/tests/ |
D | SampleTests.java | 138 final byte[] result = CardService.ConcatArrays(a, b, c); in testArrayConcat() 140 assertEquals(expected.length, result.length); in testArrayConcat() 142 assertEquals(expected[i], result[i]); in testArrayConcat() 162 final byte[] result = CardService.BuildSelectApdu(aid); in testBuildSelectApdu() 164 assertEquals(expectedResult.length, result.length); in testBuildSelectApdu() 166 assertEquals(expectedResult[i], result[i]); in testBuildSelectApdu()
|
/developers/build/prebuilts/gradle/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/camera/ |
D | CameraPreview.java | 92 int result; in calculatePreviewOrientation() local 94 result = (info.orientation + degrees) % 360; in calculatePreviewOrientation() 95 result = (360 - result) % 360; // compensate the mirror in calculatePreviewOrientation() 97 result = (info.orientation - degrees + 360) % 360; in calculatePreviewOrientation() 100 return result; in calculatePreviewOrientation()
|
/developers/build/prebuilts/gradle/CardEmulation/Application/tests/src/com/example/android/cardemulation/tests/ |
D | SampleTests.java | 138 final byte[] result = CardService.ConcatArrays(a, b, c); in testArrayConcat() 140 assertEquals(expected.length, result.length); in testArrayConcat() 142 assertEquals(expected[i], result[i]); in testArrayConcat() 162 final byte[] result = CardService.BuildSelectApdu(aid); in testBuildSelectApdu() 164 assertEquals(expectedResult.length, result.length); in testBuildSelectApdu() 166 assertEquals(expectedResult[i], result[i]); in testBuildSelectApdu()
|