Commit Graph

59 Commits

Author SHA1 Message Date
Bob Badour
f7cf305656 [LSC] Add LOCAL_LICENSE_KINDS to development
Added SPDX-license-identifier-Apache-2.0 to:
  apps/BluetoothDebug/Android.bp
  apps/BuildWidget/Android.bp
  apps/CustomLocale/Android.bp
  apps/DevelopmentSettings/Android.bp
  apps/Fallback/Android.bp
  apps/GestureBuilder/Android.bp
  apps/NinePatchLab/Android.bp
  apps/OBJViewer/Android.bp
  apps/PushApiAuthenticator/Android.bp
  apps/PushApiTestAppOne/Android.bp
  apps/PushApiTestAppTwo/Android.bp
  apps/SdkSetup/Android.bp
  apps/SettingInjectorSample/Android.bp
  apps/WidgetPreview/Android.bp
  apps/launchperf/Android.bp
  cmds/monkey/Android.mk
  gsi/gsi_util/Android.bp
  gsi/repack_super_image/Android.bp
  host/windows/Android.bp
  python-packages/Android.bp
  samples/AccelerometerPlay/Android.bp
  samples/AdaptiveIconSample/Android.bp
  samples/AliasActivity/Android.bp
  samples/AndroidBeamDemo/Android.bp
  samples/AppNavigation/Android.bp
  samples/AutofillKeyboard/Android.bp
  samples/BackupRestore/Android.bp
  samples/BasicGLSurfaceView/Android.bp
  samples/BluetoothChat/Android.bp
  samples/BrokenKeyDerivation/Android.bp
  samples/BrokenKeyDerivation/tests/Android.bp
  samples/BusinessCard/Android.bp
  samples/Compass/Android.bp
  samples/ContactManager/Android.bp
  samples/CubeLiveWallpaper/Android.bp
  samples/DataWiper/Android.bp
  samples/DeviceAdminWhitelistedAccount/Android.bp
  samples/FixedGridLayout/Android.bp
  samples/HeavyWeight/Android.bp
  samples/HelloActivity/Android.bp
  samples/HelloActivity/tests/Android.bp
  samples/HelloEffects/Android.bp
  samples/Home/Android.bp
  samples/HoneycombGallery/Android.bp
  samples/InlineFillService/Android.bp
  samples/JetBoy/Android.bp
  samples/LceDemo/Android.bp
  samples/LunarLander/Android.bp
  samples/LunarLander/tests/Android.bp
  samples/MultiResolution/Android.bp
  samples/MultiWindow/Android.bp
  samples/MySampleRss/Android.bp
  samples/NotePad/Android.bp
  samples/Obb/Android.bp
  samples/RSSReader/Android.bp
  samples/ReceiveShareDemo/Android.bp
  samples/SampleSyncAdapter/Android.bp
  samples/SimpleJNI/Android.bp
  samples/SimpleJNI/jni/Android.bp
  samples/SipDemo/Android.bp
  samples/SkeletonApp/Android.bp
  samples/SkeletonApp/tests/Android.bp
  samples/Snake/Android.bp
  samples/Snake/tests/Android.bp
  samples/SoftKeyboard/Android.bp
  samples/SpellChecker/HelloSpellChecker/Android.bp
  samples/SpellChecker/SampleSpellCheckerService/Android.bp
  samples/StackWidget/Android.bp
  samples/ThemedNavBarKeyboard/Android.bp
  samples/ToyVpn/Android.bp
  samples/TtsEngine/Android.bp
  samples/USB/AdbTest/Android.bp
  samples/USB/MissileLauncher/Android.bp
  samples/UiAutomator/Android.mk
  samples/Vault/Android.bp
  samples/Vault/tests/Android.bp
  samples/VoiceRecognitionService/Android.bp
  samples/VoicemailProviderDemo/Android.bp
  samples/WeatherListWidget/Android.bp
  samples/WiFiDirectDemo/Android.bp
  samples/WiFiDirectServiceDiscovery/Android.bp
  samples/Wiktionary/Android.bp
  samples/WiktionarySimple/Android.bp
  samples/XmlAdapters/Android.bp
  samples/apkcachetest/Android.bp
  samples/training/NsdChat/Android.bp
  scripts/Android.bp
  testrunner/Android.mk
  testrunner/tests/Android_native.mk
  tools/apkcheck/Android.bp
  tools/bugreport/Android.bp
  tools/etc1tool/Android.bp
  tools/idegen/Android.bp
  tools/mkstubs/Android.bp
  tools/rmtypedefs/Android.bp
  vndk/Android.bp
  vndk/tools/Android.bp
  vndk/tools/elfcheck/Android.bp
  vndk/tools/header-checker/Android.bp
  vndk/tools/header-checker/src/repr/protobuf/proto/Android.bp
  vndk/tools/header-checker/tests/integration/ifunc/Android.bp
  vndk/tools/header-checker/tests/integration/version_script_example/Android.bp
  vndk/tools/image-diff-tool/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CPL-1.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS SPDX-license-identifier-W3C
    legacy_restricted legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  samples/SearchableDictionary/Android.bp

Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered
to:
  tools/Android.bp

Added SPDX-license-identifier-BSD SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C
to:
  sdk/Android.bp

Added legacy_restricted
to:
  samples/KeyChainDemo/Android.bp
  tools/line_endings/Android.bp
  vndk/tools/definition-tool/datasets/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I9847e00fb4278bc083b4debbc751003c995ea45c
2021-02-12 17:13:45 -08:00
Jeff Sharkey
29bc7dcc26 Update language to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: I56dd8778516103367dc17ae55bdff4457185de46
2020-07-30 20:05:08 -06:00
Sasha Smundak
bef01b9173 Convert Android.mk files to Android.bp
See build/soong/README.md for more information.

Bug: 122332515
Test: treehugger
Change-Id: I0f6ae8d880114d1bc83f7aac2b96eafef76dc046
2019-06-25 14:18:16 -07:00
Narayan Kamath
d6ea1e86f2 Tidy up uses of Integer.valueOf.
Use parseInt when the result is assigned to an int. Allocates fewer
objects.

bug: 28078871
Change-Id: Icbb0507949b71bc0a729f2e65309dab939b3d853
2016-04-19 19:02:51 +01:00
Dave Platt
73f1ba806f Update sample NSD app to work reliably with current Android
Change the management of NSD Listener objects to one which ensures
that each Listener will be used for only one NSD service request at
a time (as the APIs were intended to function).  Listeners are now
allocated in a "lazy" on-demand way, rather than having one Listener
of each type allocated at application startup time.  When the Register
or Discover button is clicked, any existing Listener request of that
type will be canceled and the Listener discarded (avoiding the need
to wait until the Listener callback has been completed), and a new
Listener will be allocated.

Moves code around in the application-lifecycle callbacks to reflect
the current Android lifecycle.  Doing important things like
unregistering NSD services should not be done in the onDestroy()
callback, as there is no guarantee that the app won't be killed
before this callback is invoked.  This can lead to "zombie"
NSD registrations in KitKat.

Adds additional lifecycle logging.

Pass 2 - fix typo, clean up trailing whitespace

Pass 3 - fix onStart/onRestart mismatch

Bug: 13512512
Change-Id: Ic164110759204b27d8a14376777b593ebe1865fa
2014-03-31 13:45:36 -07:00
Adam Koch
449a64979c Remove bitmapfun code sample (it has moved to samples framework).
Change-Id: I70fc6437815001c7b98174cfe2e29e1244c55e75
2014-02-26 14:31:33 +11:00
Adam Koch
8180be1421 Bitmapfun Sample: Minor updates/fixes.
Change-Id: I71dce2fdbe41ff67cc0aac9456d72d9aa7cb8318
2013-11-07 22:01:16 +00:00
Adam Koch
47e3f029a4 Bitmapfun Sample: Minor updates to match zip file in training class.
Change-Id: I0fa13d5d8947532e9b5906b863ca75e5c85ac544
2013-10-28 17:01:45 -04:00
Adam Koch
7165109e6d Bitmapfun Sample: Cleanup gradle files to import into Studio properly.
Change-Id: I5578216d47b22ed6dcc5a33a80f7a4f6e39d810d
2013-10-22 14:16:35 -04:00
Adam Koch
da23e7a006 Bitmapfun Sample: Update for KitKat and clean up some minor bugs.
Change-Id: Iceb1c03a08193dc03747ab7946e9c19cf32ae7c7
2013-10-17 14:32:33 -04:00
Adam Koch
d308f86f33 Bitmapfun Sample: Migrate to Android Studio/gradle project.
Change-Id: I74dd29d607f066d331ffa309dba1bc6cbb30d93f
2013-10-17 11:05:13 -04:00
Stephan Linzner
8397e0c6f7 Fixed startActivity() Bug in LaunchActivityTest
Activity under test was called in setUp instead of each test method.
Now each test method makes a separate call to startActivity() like
mentioned in our documentation.

Change-Id: I41df74cd5dae30e57cb481bb85714e361a9189e8
Signed-off-by: Stephan Linzner <slinzner@google.com>
2013-07-12 13:21:47 +02:00
Stephan Linzner
fcf428647f Initial Commit for Android Testing Training Sample
Testing training sample code for Activity testing. Including
test cases for Instrumentation and Unit Testing of Activities
Uses old test structure with src/ and tests/ folder for
easy import to eclipse. Contains a build.gradle to
easily run it via the new build system from cli. Remapping
of tests/ is done within the build.gradle configuration file

Change-Id: I15f815ad185257a8fa650b3c0f10ba761044379c
Signed-off-by: Stephan Linzner <slinzner@google.com>
2013-07-11 16:05:31 +02:00
Scott Main
138f3a3139 add nav drawer sample
Change-Id: I561c7577554c587b4ecacfc6f22fc2beefce27b1
2013-05-10 13:16:09 -07:00
Scott Main
d49fbdbcc1 add support library JAR to sample
Change-Id: I15c30e19606a0b3415d5883bced4c2f56fd703fa
2013-03-22 09:53:15 -07:00
Adam Koch
90808a363f am bc1a645f: Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It\'s a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in th
* commit 'bc1a645f26a30fd95e68043b608038537b7c798f':
  Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It's a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in the detail. This sample app is backward compatible to API level 7 and also optimized for all screen sizes.
2013-03-19 11:25:44 -07:00
Adam Koch
bc1a645f26 Contacts Provider Training Class - Sample App Initial Commit
This is the sample app for the Contacts Provider Android training
class. It's a basic master/detail view with a list of contacts in the
master and contact name, photo and mailing addresses in the detail.
This sample app is backward compatible to API level 7 and also
optimized for all screen sizes.

Change-Id: I83fe6beae9fd4c3fe710426b7dd0863e094cbc89
2013-03-19 12:40:00 -04:00
Roman Nurik
85364937ce Add InteractiveChart sample code for update to Gestures training class.
Change-Id: I1e245cd6735d54603174045ca557057763861469
2013-03-11 16:22:53 -07:00
Adam Koch
5f51b7fb0c Bitmapfun Sample: Add some docs and clean up some method naming.
Change-Id: I12dc039b1084a8f1a27b47a5a516773ab4e1c2cb
2013-02-21 11:00:19 -05:00
Adam Koch
e826ee24ec Merge "Bitmapfun Sample: Add additional sample images." into jb-mr1-dev 2013-02-21 14:03:07 +00:00
Adam Koch
ec4b4c4188 Bitmapfun Sample: Add additional sample images.
Add a larger number of sample images so it's easier to see the result
of the various bitmap optimizations.

Change-Id: Ieef04a1cd4dc6cf1fa165baa0a6f8d4750b58d71
2013-02-20 15:08:06 -05:00
Chris Banes
3b7f23f881 bitmapfun: Add support to use inBitmap option
This adds support for devices running Honeycomb or newer
to use the inBitmap BitmapFactory option when decoding images. The way
it accomplishes this is by adding a second level 'memory cache' using
SoftReferences. When an item is removed from the LruCache it is added
to this SoftReference Set. The next time an image is decoded, the Set
is searched to see if it contains a bitmap that can be re-used.

Change-Id: I8f980160ddc7116731b25e6f3f110c38f207f286
Signed-off-by: Chris Banes <chrisbanes@google.com>
2013-02-13 13:19:09 +00:00
Chris Banes
4d6574e878 Update bitmapfun sample to call recycle()
A new sub-class of BitmapDrawable has been created which tracks
when it is being used or cached when running on Gingerbread or
older. A new ImageView subclass has been added to accomplish this,
as well as changes to the LruCache.

Change-Id: I95d3334684703aebb6b09fcd56194cf73e3c2dcf
Signed-off-by: Chris Banes <chrisbanes@google.com>
2013-02-06 16:21:21 +00:00
Adam Koch
2e5555e04b Bitmapfun Sample: Fix bug where background image loading could hang
Background image loading is paused when the GridView is scrolling,
if the activity is destroyed during a scroll the image loading was
not unpaused causing it to remain running indefinitely. This change
makes sure the background image loading is unpaused.

Change-Id: Iad8093fc2af50fcfc1416c5d9089db0c064711cf
2013-01-28 12:20:42 -05:00
Adam Koch
b8a61acb07 Bitmapfun Sample: Change cache memory calculation to use maxMemory()
When calculating memory cache size, use Runtime.maxMemory() instead
of getMemoryClass() which is a more accurate value of available VM
heap size.

Also bump target and build SDK to 17.

Bug: 7988323
Change-Id: I4b94688b3800d958ffbe03ee9a2a620982483d3d
2013-01-11 16:51:09 -05:00
Adam Koch
6acfaccc50 Bitmapfun Sample: Fix inSampleSize selection and update dependencies
When computing inSampleSize, calculateInSampleSize() needs to compare
height/width ratios, rather than raw values.

Also updating support library JAR to latest version.

Bug: 7951398
Change-Id: Id15dbcc105bbd2bbf8e03883aeba780da6f807eb
2013-01-09 16:12:52 -05:00
Katie McCormick
65cc8b78a8 Network sample: fix typo in manifest
Change-Id: I5731dbb89d17bd15bc72a2f140bca2915976b4c1
2013-01-04 16:04:23 -08:00
Joe Malin
50600ba5d6 am a525bf71: am 1e083591: am 2c063c88: Android Training: Threads sample app
* commit 'a525bf719545fc315d03c1c6ee74f61e8dda03e0':
  Android Training: Threads sample app
2012-12-13 11:00:59 -08:00
Joe Malin
2c063c889a Android Training: Threads sample app
Change-Id: I6d07871acad31807eb4bf06aa8406b722320680c
2012-12-12 10:47:58 -08:00
kmccormick@google.com
ab85a2a59a am d77ac2b9: am 80e0ac6a: am 70db2b6b: Merge "Doc change: sample app for Notifications class" into jb-dev-docs
* commit 'd77ac2b955ff5adf68f7437bb286c3e02430f896':
  Doc change: sample app for Notifications class
2012-11-27 11:25:27 -08:00
&& repo sync -j8
fc0d593056 Doc change: sample app for Notifications class
Change-Id: Iaa45156f333e5b8e9bc9cc596900835540ff138e
2012-11-26 16:56:34 -08:00
Katie McCormick
99ca344b23 cherrypick from ics-mr1 docs: network sample Change-Id: If50f407a0e56fa802fe9beedaa650e3a131872b2
Change-Id: I60235aa3e80974f2c3000760853f0159cf41cfa5
2012-11-05 14:52:30 -08:00
Roman Nurik
01be9fd4c0 AnimationsDemo sample code for Animations training class.
Change-Id: I0fbf3c2f66ee4321adcc0c0bf3fe7f4b4e67584e
2012-10-25 12:59:24 -07:00
Adam Koch
a4877aed76 Merge "Updating code sample for "displaying bitmaps efficiently" training class. Changes: -Use updated versions of ImageWorker & ImageCache from I/O 2012 app -Use copied DiskLruCache from system (rather than custom) -Use copied AsyncTask from system (to keep behavior consistent) -Ensure no strict mode violations or lint errors -Other misc bug fixes -Move single-use static methods in Utils to corresponding class" into jb-dev 2012-08-28 07:42:11 -07:00
Adam Koch
03ceb37f79 Updating code sample for "displaying bitmaps efficiently" training class.
Changes:
 -Use updated versions of ImageWorker & ImageCache from I/O 2012 app
 -Use copied DiskLruCache from system (rather than custom)
 -Use copied AsyncTask from system (to keep behavior consistent)
 -Ensure no strict mode violations or lint errors
 -Other misc bug fixes
 -Move single-use static methods in Utils to corresponding class

Change-Id: If21e045db1e1a80391169f3c9c9258d48345ab6b
2012-08-23 16:41:05 -04:00
Roman Nurik
d80ee02011 Retroactively add EffectiveNavigation and TabCompat sample code.
This sample code was launched with the Implementing Effective Navigation and
Creating Backward-Compatible UIs training classes, but the source was never
added to AOSP. This retroactively adds the source, unmodified.

Change-Id: If6face5a0548107f7fd273e466b1ced2790f4f3a
2012-08-22 08:05:28 -07:00
Scott Main
826be7b0f9 remove all zip files for training class samples.
They're now at frameworks/base/docs/downloads/

Change-Id: I3a82edcc73196dfc8ffc6a1e4d172925d5581157
2012-08-07 15:13:23 -07:00
Scott Main
d0f75a5ae3 docs: move all ZIP files for training classes here, originally
from the html/shareables/ directory to save space on the developer site.

Change-Id: I545e0002215b17aa0a2e8e261591652046308210
2012-07-25 14:51:20 -07:00
Alexander Lucas
8a8046a918 Initial commit of NsdChat application
Change-Id: I157ddfe38b79f01e72e8b52fa16d666c92f08254
2012-06-18 16:25:19 -07:00
Scott Main
1583b7c603 Delete the fragment-UI sample in favor of the FragmentBasics sample
for the 101 training class on fragments

Change-Id: I3289e3f4d74869956ee20a5b817a469cce885018
2012-04-19 16:49:16 -07:00
Scott Main
ff329d74fc Merge "Rename the activity lifecycle sample's directory" into ics-mr1 2012-04-19 16:47:27 -07:00
Scott Main
d573ba579b Rename the activity lifecycle sample's directory
Change-Id: I76c27dfbead6462b0bdfc3b58e24b0fe96d8272f
2012-04-19 16:46:14 -07:00
Scott Main
ba1636e425 Add new sample for 101 class on fragments.
The app has a fragment with a list that shows a couple phony
article names and a fragment that displays the phony articles.
They appear side by side on a large screen, but one at a time on smaller screens.

Change-Id: Ic78b772e1c8d1ddbfa6fa3fdb0b54a2363951063
2012-04-19 16:18:16 -07:00
Fred Chung
16266ff711 Updated "Making your App Location Aware" class to include information on location provider enable check.
Change-Id: I97e0a6b02bccbfbdc5697953d2d8b63cb6089370
2012-04-16 23:26:40 -07:00
Scott Main
cbece7322a Merge "Sample app for Android U class: Displaying Bitmaps Efficiently" into ics-mr1 2012-04-05 11:29:42 -07:00
Trevor Johns
a539e4e377 Update activity-lifecycle sample: Use unique package name
Changing the package name for activity-lifecycle sample from
com.example.android to com.example.android.lifecycle.

Change-Id: I8c17762fde0895408da0b2e1b17b425bcb9e7abb
2012-04-04 17:21:53 -07:00
Scott Main
dfd2ae2278 Merge "uploading sample code for AU class on Activity Lifecycle" into ics-mr1 2012-04-04 16:25:14 -07:00
Scott Main
96f6139c59 Merge "first draft of sample code for AU basic training class on fragments" into ics-mr1 2012-04-04 16:22:49 -07:00
Fred Chung
137dce1528 Sample app for Android Training lesson: Making your app location aware.
Change-Id: I205a9e3f98823fbd90c5b770de8fe6ce8a9e345b
2012-04-03 22:46:10 -07:00
Billy Rutledge
87a714c17c uploading sample code for AU class on Activity Lifecycle
Change-Id: Ieefd55823eaa7ce7042a5dd8739a8ab7c4b992fc
2012-04-03 20:39:32 -07:00