/developers/samples/android/media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/ |
D | BitmapHelper.java | 40 public static Bitmap scaleBitmap(int scaleFactor, InputStream is) { in scaleBitmap() argument 48 return BitmapFactory.decodeStream(is, null, bmOptions); in scaleBitmap() 51 public static int findScaleFactor(int targetW, int targetH, InputStream is) { in findScaleFactor() argument 55 BitmapFactory.decodeStream(is, null, bmOptions); in findScaleFactor() 67 BufferedInputStream is = null; in fetchAndRescaleBitmap() local 70 is = new BufferedInputStream(urlConnection.getInputStream()); in fetchAndRescaleBitmap() 71 is.mark(MAX_READ_LIMIT_PER_IMG); in fetchAndRescaleBitmap() 72 int scaleFactor = findScaleFactor(width, height, is); in fetchAndRescaleBitmap() 75 is.reset(); in fetchAndRescaleBitmap() 76 return scaleBitmap(scaleFactor, is); in fetchAndRescaleBitmap() [all …]
|
/developers/build/prebuilts/gradle/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/ |
D | BitmapHelper.java | 40 public static Bitmap scaleBitmap(int scaleFactor, InputStream is) { in scaleBitmap() argument 48 return BitmapFactory.decodeStream(is, null, bmOptions); in scaleBitmap() 51 public static int findScaleFactor(int targetW, int targetH, InputStream is) { in findScaleFactor() argument 55 BitmapFactory.decodeStream(is, null, bmOptions); in findScaleFactor() 67 BufferedInputStream is = null; in fetchAndRescaleBitmap() local 70 is = new BufferedInputStream(urlConnection.getInputStream()); in fetchAndRescaleBitmap() 71 is.mark(MAX_READ_LIMIT_PER_IMG); in fetchAndRescaleBitmap() 72 int scaleFactor = findScaleFactor(width, height, is); in fetchAndRescaleBitmap() 75 is.reset(); in fetchAndRescaleBitmap() 76 return scaleBitmap(scaleFactor, is); in fetchAndRescaleBitmap() [all …]
|
/developers/build/prebuilts/gradle/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | AssetUtils.java | 36 InputStream is = context.getAssets().open(asset); in loadAsset() local 37 int size = is.available(); in loadAsset() 39 is.read(buffer); in loadAsset() 40 is.close(); in loadAsset() 59 InputStream is = null; in loadBitmapAsset() local 62 is = context.getAssets().open(asset); in loadBitmapAsset() 63 if (is != null) { in loadBitmapAsset() 64 bitmap = BitmapFactory.decodeStream(is); in loadBitmapAsset() 69 if (is != null) { in loadBitmapAsset() 71 is.close(); in loadBitmapAsset()
|
/developers/samples/android/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | AssetUtils.java | 36 InputStream is = context.getAssets().open(asset); in loadAsset() local 37 int size = is.available(); in loadAsset() 39 is.read(buffer); in loadAsset() 40 is.close(); in loadAsset() 59 InputStream is = null; in loadBitmapAsset() local 62 is = context.getAssets().open(asset); in loadBitmapAsset() 63 if (is != null) { in loadBitmapAsset() 64 bitmap = BitmapFactory.decodeStream(is); in loadBitmapAsset() 69 if (is != null) { in loadBitmapAsset() 71 is.close(); in loadBitmapAsset()
|
/developers/build/prebuilts/gradle/Quiz/Application/src/main/java/com/example/android/wearable/quiz/ |
D | JsonUtils.java | 39 InputStream is = context.getAssets().open(fileName); in loadJsonFile() local 40 int size = is.available(); in loadJsonFile() 42 is.read(buffer); in loadJsonFile() 43 is.close(); in loadJsonFile()
|
/developers/samples/android/wearable/wear/Quiz/Application/src/main/java/com/example/android/wearable/quiz/ |
D | JsonUtils.java | 39 InputStream is = context.getAssets().open(fileName); in loadJsonFile() local 40 int size = is.available(); in loadJsonFile() 42 is.read(buffer); in loadJsonFile() 43 is.close(); in loadJsonFile()
|
/developers/build/prebuilts/gradle/MessagingService/ |
D | README.md | 10 when the notification is presented there. 11 Note: Each unread conversation from a user is sent as a distinct 21 is automotive enabled. 41 MessagingFragment is shown to the user. Depending on the button clicked, the MessagingService is 45 When a message is read, the associated PendingIntent is triggered and MessageReadReceiver is called 46 with the appropriate conversationId. Similarly, when a reply is received, the MessageReplyReceiver 47 is called with the appropriate conversationId. MessageLogger logs each event and shows them in a 95 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/notification/MessagingService/ |
D | README.md | 8 Each unread conversation from a user is sent as a distinct notification. 17 is automotive enabled. 37 MessagingFragment is shown to the user. Depending on the button clicked, the MessagingService is 41 When a message is read, the associated PendingIntent is triggered and MessageReadReceiver is called 42 with the appropriate conversationId. Similarly, when a reply is received, the MessageReplyReceiver 43 is called with the appropriate conversationId. MessageLogger logs each event and shows them in a 91 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/media/HdrViewfinder/ |
D | README.md | 7 compositing together the latest two frames whenever a new frame is captured. 16 frames, and then compositing together the latest two frames whenever a new frame is 30 The HDR fusion and the split-screen viewfinder processing is done with RenderScript; as is the 33 fused/composited, a standard YUV->RGB color transform is applied before the the data is written 34 to the output Allocation. The HDR fusion algorithm is very simple, and tends to result in 37 Data is passed between the subsystems (camera, RenderScript, and display) using the 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/HdrViewfinder/ |
D | README.md | 7 compositing together the latest two frames whenever a new frame is captured. 16 frames, and then compositing together the latest two frames whenever a new frame is 30 The HDR fusion and the split-screen viewfinder processing is done with RenderScript; as is the 33 fused/composited, a standard YUV->RGB color transform is applied before the the data is written 34 to the output Allocation. The HDR fusion algorithm is very simple, and tends to result in 37 Data is passed between the subsystems (camera, RenderScript, and display) using the 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/DirectBoot/ |
D | README.md | 6 is always available while the device is booted both before and after any 13 storage which is always available while the device is booted. 20 …- A new storage location which is always available while the device is booted, both before and aft… 23 Credential protected storage is unavailable (an direct boot aware component primarily relies on dat… 38 You need to be careful what data is stored/moved to a device protected storage 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/BatchStepSensor/ |
D | README.md | 18 event when a step is detected, while the step counter returns the total number of 21 Both sensors only count steps while a listener is registered. This sample only covers the 22 basic case, where a listener is only registered while the app is running. Likewise, 23 batched sensors can be used in the background (when the CPU is suspended), which 24 requires manually flushing the [sensor event][3] queue before it overflows, which is not 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/ui/transition/BasicTransition/ |
D | README.md | 12 A Scene is an encapsulation of the state of a view hierarchy, 16 scene dynamically as it is entered. 18 A Transition is a mechanism to automatically animate changes that 19 occur when a new scene is entered. Some transition capabilities are 20 automatic. That is, entering a scene may cause animations to run which 29 TransitionManager is used to specify custom transitions for particular 78 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/sensors/BatchStepSensor/ |
D | README.md | 18 event when a step is detected, while the step counter returns the total number of 21 Both sensors only count steps while a listener is registered. This sample only covers the 22 basic case, where a listener is only registered while the app is running. Likewise, 23 batched sensors can be used in the background (when the CPU is suspended), which 24 requires manually flushing the [sensor event][3] queue before it overflows, which is not 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/BasicTransition/ |
D | README.md | 12 A Scene is an encapsulation of the state of a view hierarchy, 16 scene dynamically as it is entered. 18 A Transition is a mechanism to automatically animate changes that 19 occur when a new scene is entered. Some transition capabilities are 20 automatic. That is, entering a scene may cause animations to run which 29 TransitionManager is used to specify custom transitions for particular 78 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/templates/create/ |
D | template-params.xml.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 32 Introductory text that explains what the sample is intended to demonstrate. Edit 54 <!-- Most samples just need to udpate the Categories field. This is a comma- 63 <!-- Beginner is for "getting started" type content, or essential content. 66 Intermediate is for content that covers material a beginner doesn't need 67 to know, but that a skilled developer is expected to know. 70 Advanced is for highly technical content geared towards experienced developers. 73 Expert is reserved for highly technical or specialized content, and should
|
/developers/build/templates/CardStream/_MODULE_/src/template/java/_PACKAGE_/cardstream/ |
D | CardStreamAnimator.java.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 49 * Define disappearing animation of a child which fired when a view is removed programmatically 57 * Define appearing animation of a child which fired when a view is added programmatically 66 * which fired when a view is not moved enough to be removed. 77 * which fired when a view is removing by a user swipe action. 87 * A simple CardStreamAnimator implementation which is used to turn animations off.
|
/developers/build/templates/create/_MODULE_/ |
D | build.gradle.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 18 <#-- This build script is a bootstrapper for the "real" android build script that 19 is contained in templates/base. It includes only what's necessary for Android Studio 36 <#-- Note that target SDK is hardcoded in this template. We expect all samples
|
/developers/build/prebuilts/gradle/JumpingJack/ |
D | README.md | 34 The detectJump method above assumes that when a person is wearing the watch, the x-component of gra… 35 as measured by the Gravity Sensor is +9.8 when the hand is downward and -9.8 when the hand 36 is upward (signs are reversed if the watch is worn on the right hand). Since the upward or 89 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/templates/include/ |
D | common.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 23 <#-- Set the compile SDK version. This is more complicated than it should be, because 25 both to see if the variable is empty. Note that to freemarker, all values from 44 <#-- Set the MinSDK version. This is more complicated than it should be, because 46 both to see if the variable is empty. Note that to freemarker, all values from 68 <#-- Check if dependency is a play services dependency and if it doesn't
|
/developers/samples/android/connectivity/wifidirect/DirectP2P/Application/src/main/java/com/example/android/wifidirectp2p/ |
D | FileTransferService.java | 61 InputStream is = null; in onHandleIntent() local 63 is = cr.openInputStream(Uri.parse(fileUri)); in onHandleIntent() 67 DeviceDetailFragment.copyFile(is, stream); in onHandleIntent()
|
/developers/samples/android/ui/actionbar/DoneBar/ |
D | README.md | 6 2 alternative layouts. This is well suited for simple data entry activities, where the only 13 …r even recommended, as using a menu xml file is all that is needed to add action icons to it. Howe… 14 possible to use a custom view and it is useful in some cases. 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/gradle/DoneBar/ |
D | README.md | 6 2 alternative layouts. This is well suited for simple data entry activities, where the only 13 …r even recommended, as using a menu xml file is all that is needed to add action icons to it. Howe… 14 possible to use a custom view and it is useful in some cases. 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/prebuilts/androidtv/leanback/ |
D | CONTRIBUTING.md | 28 * Ensure that your code is clear and comprehensible. 31 1. The repo owner will review your request. If it is approved, the change will 49 * Ensure that your code is clear and comprehensible. 51 * Instructional value is the top priority when evaluating new app proposals for 54 1. The repo owner will review your request. If it is approved, the sample will
|
/developers/build/prebuilts/androidtv/sample-inputs/ |
D | CONTRIBUTING.md | 28 * Ensure that your code is clear and comprehensible. 31 1. The repo owner will review your request. If it is approved, the change will 49 * Ensure that your code is clear and comprehensible. 51 * Instructional value is the top priority when evaluating new app proposals for 54 1. The repo owner will review your request. If it is approved, the sample will
|