/development/samples/browseable/MediaBrowserService/src/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 …]
|
/development/samples/browseable/RecipeAssistant/Application/src/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()
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | BitmapDecode.java | 51 private static byte[] streamToBytes(InputStream is) { in streamToBytes() argument 56 while ((len = is.read(buffer)) >= 0) { in streamToBytes() 68 java.io.InputStream is; in SampleView() local 69 is = context.getResources().openRawResource(R.drawable.beach); in SampleView() 75 bm = BitmapFactory.decodeStream(is, null, opts); in SampleView() 82 bm = BitmapFactory.decodeStream(is, null, opts); in SampleView() 87 is = context.getResources().openRawResource(R.drawable.frog); in SampleView() 88 mBitmap2 = BitmapFactory.decodeStream(is); in SampleView() 103 is = context.getResources().openRawResource(R.drawable.animated_gif); in SampleView() 106 mMovie = Movie.decodeStream(is); in SampleView() [all …]
|
/development/samples/TicTacToeMain/ |
D | README.txt | 10 Build is supported both via Ant (command-line tools) or via ADT (the Android 17 TicTacToeMain is the main project. It defines a main activity that is first 18 displayed to the user. When one of the start buttons is selected, an 19 activity defined in TicTacToeLib is started. 26 TicTacToeLib is the "project library". It can contain both source code (.java) 28 APK. To define this is a library, the file TicTacToeLib/default.project 33 One important thing to realize is that the library is not a separately-compiled 35 the main project and the result is used to generate the APK. This means that
|
/development/samples/browseable/Quiz/Application/src/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()
|
/development/samples/browseable/BatchStepSensor/ |
D | _index.jd | 13 event when a step is detected, while the step counter returns the total number of 15 … Both sensors only count steps while a listener is registered. This sample only covers the 16 basic case, where a listener is only registered while the app is running. Likewise, 17 batched sensors can be used in the background (when the CPU is suspended), which 18 requires manually flushing the sensor event queue before it overflows, which is not
|
/development/samples/ApiDemos/src/com/example/android/apis/content/ |
D | ReadAsset.java | 49 InputStream is = getAssets().open("read_asset.txt"); in onCreate() local 54 int size = is.available(); in onCreate() 58 is.read(buffer); in onCreate() 59 is.close(); in onCreate()
|
D | ExternalStorage.java | 198 InputStream is = getResources().openRawResource(R.drawable.balloons); in createExternalStoragePublicPicture() local 200 byte[] data = new byte[is.available()]; in createExternalStoragePublicPicture() 201 is.read(data); in createExternalStoragePublicPicture() 203 is.close(); in createExternalStoragePublicPicture() 262 InputStream is = getResources().openRawResource(R.drawable.balloons); in createExternalStoragePrivatePicture() local 264 byte[] data = new byte[is.available()]; in createExternalStoragePrivatePicture() 265 is.read(data); in createExternalStoragePrivatePicture() 267 is.close(); in createExternalStoragePrivatePicture() 324 InputStream is = getResources().openRawResource(R.drawable.balloons); in createExternalStoragePrivateFile() local 326 byte[] data = new byte[is.available()]; in createExternalStoragePrivateFile() [all …]
|
/development/samples/SkeletonApp/ |
D | readme.txt | 8 list in the app launcher (it is named Skeleton App) or by selecting it from 17 It is a required file, and is the mechanism you use to show your application 23 Under this directory is the Java source for for your application. 28 This is the implementation of the "activity" feature described in 29 AndroidManifest.xml. The path each class implementation is 42 view hierarchies. The skeleton_activity.xml file here is used by 44 (all text before a '.' character) is taken as the resource name; 53 here is used as the image to display in one of the views in 54 skeleton_activity.xml. Like layout files, the base name is used for the
|
/development/tools/mkstubs/ |
D | README.txt | 7 MkStub is small tool that takes a given JAR and filters all the private stuff we don't want to 13 Each method body is replaced by the bytecode for 'throw new RuntimeException("stub");'. 22 +foo => accepts all items which signature is exactly "foo" 24 -bar => rejects all items which signature is exactly "bar" 52 To invoke MkStub, the syntax is: 71 Suggestion: if type x.y.z is excluded, then any field, annotation, generic type, 76 This is not orthogonal to the fact that private fields and methods are automatically 79 - Private fields and methods are automatically excluded. There is no command line 82 - The stubbed source is always generated. For example if the output jar name is 85 There is not command line switch to prevent that. [all …]
|
/development/samples/browseable/BasicNetworking/ |
D | _index.jd | 9 a network connection, and if so, what type of connection it is. 10 … \n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information 11 … on the active connection, and then the connection type is printed to an on-screen console.
|
/development/scripts/gdb/ |
D | dalvik.gdb | 11 # distributed under the License is distributed on an "AS IS" BASIS, 36 printf "ART debugging mode is enabled.\n" 42 printf "ART debugging mode is already enabled.\n" 48 by gdb unless they are not handled by ART itself. A breakpoint is 49 set to stop the program when an unexpected SIGSEGV signal is 64 printf "ART debugging mode is disabled.\n" 69 Leave ART debugging mode. Signal handling is restored to default settings.
|
/development/ndk/zlib/ |
D | NOTICE | 3 This software is provided 'as-is', without any express or implied 7 Permission is granted to anyone to use this software for any purpose, 14 appreciated but is not required.
|
/development/tools/labpretest/ |
D | README | 3 The labpretest.sh script is designed to emulate a typical automated test lab 9 It will detect if it is in a low battery situation and wait for it to charge 12 The goal is to see if a device is ready for deployment to automated lab testing 13 and can also be used to verify that lab infrastructure is ready for devices. 14 The idea is to run this script at the same time for multiple devices, typically 20 If there is only one device attached to the host you can simply just run the 47 file that is read in before the main loop starts. It allows you to add any non 49 the variable "bootpart" which is not defined by default. Also, use this file to
|
/development/samples/training/network-usage/ |
D | README.txt | 11 when any network connection is available, or only when a Wi-Fi connection is available. 13 -- Detects when there is a change in the device's connection status and responds accordingly. For e…
|
/development/samples/browseable/DrawableTinting/ |
D | _index.jd | 10 … \n\nTinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters. 11 A color state list is referenced as the tint color, which defines colors for different 13 … \n\nProgrammatically, tinting is applied to a Drawable through its "setColorFilter" method,
|
/development/samples/JetBoy/ |
D | JETBOY_content_README.txt | 5 1. Open a command prompt and go to the directory where the JetCreator tool is located. 14 The "JETBOY_Music.logic" file is the Logic file used to create the JETBOY music composition. This f…
|
/development/tools/apkcheck/ |
D | README.txt | 8 frameworks/base/api/. The tip-of-tree version is in "current.xml", 16 beyond the name (e.g. whether a class is a static or non-static inner 17 class), so while the output from dexdeps is similar in structure to the 27 public API XML file is generally much larger than the time required to 37 Load additional public API list. This is intended for APKs that 46 XML API data is not available. 92 the enumeration values. This makes it look like an APK is referring 96 class appears to be an Enum (the superclass is java.lang.Enum), we emit 103 and "implements java.lang.annotation.Annotation". It is not possible 104 to verify that a method call on an annotation is valid. [all …]
|
/development/samples/browseable/WearVerifyRemoteApp/ |
D | _index.jd | 8 Sample demonstrates best practices for checking if the remote version of your app is installed on a 9 connected device. This enables standalone Android Wear apps to check if the phone app is installed
|
/development/samples/training/basic/ActivityLifecycle/ |
D | ant.properties | 1 # This file is used to override default values used by the Ant build system. 3 # This file must be checked in Version Control Systems, as it is 6 # This file is only used by the Ant script.
|
D | build.properties | 1 # This file is used to override default values used by the Ant build system. 3 # This file must be checked in Version Control Systems, as it is 6 # This file is only used by the Ant script.
|
/development/tools/checkcolor/ |
D | README | 2 This project is used to build a lint library to detect the hardcoded 3 colors. One example of hardcoded color is:
|
/development/samples/browseable/RuntimePermissions/ |
D | _index.jd | 10 If executed on an Android M device, an additional option to access contacts is shown 11 that is declared with optional, M and above only permissions.
|
/development/host/windows/usb/api/ |
D | BUILDME.TXT | 10 distributed under the License is distributed on an "AS IS" BASIS, 23 This old version is used because it can build for Windows Vista (WDK 8.1 24 cannot), it includes compilers (so it doesn't require Visual Studio), and it is 28 When installing the WDK, uncheck `Device Simulation Framework' because it is 31 Assuming that WDK is installed, you need to set one of the WDK's build
|
/development/samples/browseable/DirectBoot/ |
D | _index.jd | 9 which is always available while the device is booted.
|