summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/AppRestrictionEnforcerFragment.java351
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java27
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/EasyTextWatcher.java38
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java47
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java136
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_app_restriction_enforcer.xml124
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_status.xml39
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml22
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/res/values/ids.xml21
-rw-r--r--admin/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml4
-rw-r--r--admin/AppRestrictionEnforcer/gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--admin/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java117
-rw-r--r--admin/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml70
-rw-r--r--admin/AppRestrictionSchema/Application/src/main/res/layout/separator.xml22
-rw-r--r--admin/AppRestrictionSchema/Application/src/main/res/values/restriction_values.xml77
-rw-r--r--admin/AppRestrictionSchema/Application/src/main/res/values/strings.xml11
-rw-r--r--admin/AppRestrictionSchema/Application/src/main/res/xml/app_restrictions.xml48
-rw-r--r--admin/AppRestrictionSchema/gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--admin/AppRestrictionSchema/screenshots/main.pngbin0 -> 108165 bytes
-rw-r--r--admin/AppRestrictionSchema/template-params.xml68
-rw-r--r--admin/BasicManagedProfile/gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xadmin/BasicManagedProfile/screenshots/icon-web.pngbin0 -> 58382 bytes
-rw-r--r--admin/BasicManagedProfile/screenshots/main.pngbin0 -> 147273 bytes
-rw-r--r--admin/BasicManagedProfile/screenshots/not_set_up.pngbin0 -> 58427 bytes
-rw-r--r--admin/BasicManagedProfile/screenshots/set_up.pngbin0 -> 100391 bytes
-rw-r--r--admin/BasicManagedProfile/template-params.xml57
-rw-r--r--background/JobScheduler/Application/src/main/java/com/example/android/jobscheduler/MainActivity.java4
-rw-r--r--background/JobScheduler/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--background/alarms/RepeatingAlarm/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--build.gradle19
-rw-r--r--connectivity/bluetooth/BluetoothChat/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/bluetooth/BluetoothChat/screenshots/1-launch.pngbin0 -> 102399 bytes
-rw-r--r--connectivity/bluetooth/BluetoothChat/screenshots/2-devices.pngbin0 -> 180960 bytes
-rw-r--r--connectivity/bluetooth/BluetoothChat/screenshots/3-chat.pngbin0 -> 109847 bytes
-rw-r--r--connectivity/bluetooth/BluetoothChat/screenshots/icon-web.pngbin0 -> 76079 bytes
-rw-r--r--connectivity/bluetooth/BluetoothChat/template-params.xml55
-rw-r--r--connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/bluetooth/BluetoothLeGatt/screenshots/1-main.pngbin0 -> 68389 bytes
-rw-r--r--connectivity/bluetooth/BluetoothLeGatt/screenshots/2-detail.pngbin0 -> 80086 bytes
-rw-r--r--connectivity/bluetooth/BluetoothLeGatt/screenshots/icon-web.pngbin0 -> 70614 bytes
-rw-r--r--connectivity/bluetooth/BluetoothLeGatt/template-params.xml39
-rwxr-xr-xconnectivity/network/BasicNetworking/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin4407 -> 4499 bytes
-rwxr-xr-xconnectivity/network/BasicNetworking/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2668 -> 2721 bytes
-rwxr-xr-xconnectivity/network/BasicNetworking/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin6230 -> 6287 bytes
-rwxr-xr-xconnectivity/network/BasicNetworking/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin11294 -> 10763 bytes
-rw-r--r--connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/network/BasicNetworking/screenshots/big_icon.pngbin0 -> 65211 bytes
-rw-r--r--connectivity/network/BasicNetworking/screenshots/start.pngbin0 -> 149545 bytes
-rw-r--r--connectivity/network/BasicNetworking/screenshots/tested.pngbin0 -> 162094 bytes
-rw-r--r--connectivity/network/BasicNetworking/template-params.xml44
-rw-r--r--connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/nfc/BeamLargeFiles/Application/src/main/AndroidManifest.xml2
-rw-r--r--connectivity/nfc/BeamLargeFiles/Application/src/main/res/menu/main.xml18
-rw-r--r--connectivity/nfc/BeamLargeFiles/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/nfc/BeamLargeFiles/template-params.xml1
-rw-r--r--connectivity/nfc/CardEmulation/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/nfc/CardReader/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/sync/BasicSyncAdapter/Application/src/main/big_icon.pngbin0 -> 74499 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin5473 -> 4588 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin3298 -> 2770 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin7401 -> 6549 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin12074 -> 11666 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--connectivity/sync/BasicSyncAdapter/screenshots/icon-web.pngbin0 -> 74499 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/screenshots/main.pngbin0 -> 270487 bytes
-rw-r--r--connectivity/sync/BasicSyncAdapter/template-params.xml46
-rw-r--r--content/WidgetData/Application/.gitignore (renamed from media/MediaEffects/MediaEffectsSample/.gitignore)0
-rw-r--r--content/WidgetData/Application/README-fragmentview.txt37
-rw-r--r--content/WidgetData/Application/proguard-project.txt (renamed from media/MediaEffects/MediaEffectsSample/proguard-project.txt)0
-rw-r--r--content/WidgetData/Application/src/main/AndroidManifest.xml59
-rw-r--r--content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java135
-rw-r--r--content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetProvider.java234
-rw-r--r--content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetService.java119
-rw-r--r--content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java19
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4171 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-hdpi/sunny.pngbin0 -> 9544 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2541 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-mdpi/sunny.pngbin0 -> 17217 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-nodpi/preview.pngbin0 -> 20340 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 5729 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 10104 bytes
-rw-r--r--content/WidgetData/Application/src/main/res/layout/fragment.xml29
-rw-r--r--content/WidgetData/Application/src/main/res/layout/widget_item.xml23
-rw-r--r--content/WidgetData/Application/src/main/res/layout/widget_layout.xml86
-rw-r--r--content/WidgetData/Application/src/main/res/layout/widget_layout_small.xml49
-rw-r--r--content/WidgetData/Application/src/main/res/values-v14/dimens.xml21
-rw-r--r--content/WidgetData/Application/src/main/res/values/dimens.xml21
-rw-r--r--content/WidgetData/Application/src/main/res/values/strings.xml25
-rw-r--r--content/WidgetData/Application/src/main/res/xml/widgetinfo.xml26
-rw-r--r--content/WidgetData/Application/tests/AndroidManifest.xml58
-rw-r--r--content/WidgetData/Application/tests/src/com/example/android/listwidget/tests/SampleTests.java76
-rw-r--r--content/WidgetData/LICENSE (renamed from ui/notifications/BasicNotifications/LICENSE)0
-rw-r--r--content/WidgetData/README.md67
-rw-r--r--content/WidgetData/build.gradle11
-rw-r--r--content/WidgetData/buildSrc/build.gradle15
-rw-r--r--content/WidgetData/gradle/wrapper/gradle-wrapper.jar (renamed from ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.jar)bin49896 -> 49896 bytes
-rw-r--r--content/WidgetData/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xcontent/WidgetData/gradlew (renamed from ui/notifications/BasicNotifications/gradlew)0
-rw-r--r--content/WidgetData/gradlew.bat (renamed from ui/notifications/BasicNotifications/gradlew.bat)0
-rw-r--r--content/WidgetData/screenshots/1-widget.pngbin0 -> 1620637 bytes
-rw-r--r--content/WidgetData/screenshots/icon-web.pngbin0 -> 62271 bytes
-rw-r--r--content/WidgetData/settings.gradle (renamed from ui/notifications/BasicNotifications/settings.gradle)0
-rw-r--r--content/WidgetData/template-params.xml86
-rw-r--r--content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--content/contacts/BasicContactables/screenshots/1-main.pngbin0 -> 102700 bytes
-rw-r--r--content/contacts/BasicContactables/screenshots/2-search.pngbin0 -> 145488 bytes
-rw-r--r--content/contacts/BasicContactables/screenshots/3-results.pngbin0 -> 108490 bytes
-rw-r--r--content/contacts/BasicContactables/screenshots/icon-web.pngbin0 -> 54813 bytes
-rw-r--r--content/contacts/BasicContactables/template-params.xml47
-rw-r--r--content/documentsUi/DirectorySelection/Application/.gitignore (renamed from ui/notifications/BasicNotifications/Application/.gitignore)0
-rw-r--r--content/documentsUi/DirectorySelection/Application/proguard-project.txt (renamed from ui/notifications/BasicNotifications/Application/proguard-project.txt)0
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/AndroidManifest.xml37
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntry.java25
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntryAdapter.java100
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionActivity.java37
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionFragment.java231
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-hdpi/ic_description_grey600_36dp.pngbin0 -> 425 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-hdpi/ic_folder_grey600_36dp.pngbin0 -> 292 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 3779 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-mdpi/ic_description_grey600_36dp.pngbin0 -> 271 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-mdpi/ic_folder_grey600_36dp.pngbin0 -> 227 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2391 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-xhdpi/ic_description_grey600_36dp.pngbin0 -> 461 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-xhdpi/ic_folder_grey600_36dp.pngbin0 -> 356 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 5328 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-xxhdpi/ic_description_grey600_36dp.pngbin0 -> 635 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-xxhdpi/ic_folder_grey600_36dp.pngbin0 -> 493 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 9650 bytes
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/layout/activity_directory_selection.xml23
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/layout/directory_item.xml57
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/layout/fragment_directory_selection.xml74
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/menu/main.xml16
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/values/dimens.xml20
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/values/strings.xml21
-rw-r--r--content/documentsUi/DirectorySelection/Application/src/main/res/values/styles.xml21
-rw-r--r--content/documentsUi/DirectorySelection/Application/tests/src/com/example/android/directoryselection/DirectoryEntryAdapterTest.java82
-rw-r--r--content/documentsUi/DirectorySelection/Application/tests/src/com/example/android/directoryselection/DirectorySelectionActivityTest.java56
-rw-r--r--content/documentsUi/DirectorySelection/Application/tests/src/com/example/android/directoryselection/DirectorySelectionFragmentTest.java68
-rw-r--r--content/documentsUi/DirectorySelection/build.gradle11
-rw-r--r--content/documentsUi/DirectorySelection/buildSrc/build.gradle15
-rw-r--r--content/documentsUi/DirectorySelection/gradle/wrapper/gradle-wrapper.jar (renamed from ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.jar)bin49896 -> 49896 bytes
-rw-r--r--content/documentsUi/DirectorySelection/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xcontent/documentsUi/DirectorySelection/gradlew (renamed from ui/notifications/CustomNotifications/gradlew)0
-rw-r--r--content/documentsUi/DirectorySelection/gradlew.bat (renamed from ui/notifications/CustomNotifications/gradlew.bat)0
-rw-r--r--content/documentsUi/DirectorySelection/screenshots/screenshot-1.pngbin0 -> 117267 bytes
-rw-r--r--content/documentsUi/DirectorySelection/screenshots/screenshot-2.pngbin0 -> 170338 bytes
-rw-r--r--content/documentsUi/DirectorySelection/screenshots/screenshot-3.pngbin0 -> 135819 bytes
-rwxr-xr-xcontent/documentsUi/DirectorySelection/screenshots/web-icon.pngbin0 -> 60929 bytes
-rw-r--r--content/documentsUi/DirectorySelection/settings.gradle (renamed from ui/notifications/CustomNotifications/settings.gradle)0
-rw-r--r--content/documentsUi/DirectorySelection/template-params.xml163
-rw-r--r--content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--content/documentsUi/StorageClient/template-params.xml1
-rw-r--r--[-rwxr-xr-x]content/documentsUi/StorageProvider/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin4165 -> 3454 bytes
-rw-r--r--[-rwxr-xr-x]content/documentsUi/StorageProvider/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2376 -> 2117 bytes
-rw-r--r--[-rwxr-xr-x]content/documentsUi/StorageProvider/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin6258 -> 4966 bytes
-rw-r--r--[-rwxr-xr-x]content/documentsUi/StorageProvider/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin12088 -> 8803 bytes
-rwxr-xr-xcontent/documentsUi/StorageProvider/Application/src/main/res/ic_launcher.pngbin4165 -> 0 bytes
-rw-r--r--content/documentsUi/StorageProvider/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--content/documentsUi/StorageProvider/screenshots/1-logged-out.pngbin0 -> 69595 bytes
-rw-r--r--content/documentsUi/StorageProvider/screenshots/2-logged-in.pngbin0 -> 104499 bytes
-rw-r--r--content/documentsUi/StorageProvider/screenshots/icon-web.pngbin0 -> 56675 bytes
-rw-r--r--content/documentsUi/StorageProvider/template-params.xml33
-rw-r--r--content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--content/webview/PermissionRequest/Application/.gitignore (renamed from ui/notifications/CustomNotifications/Application/.gitignore)0
-rw-r--r--content/webview/PermissionRequest/Application/README-fragmentview.txt37
-rw-r--r--content/webview/PermissionRequest/Application/README-singleview.txt47
-rw-r--r--content/webview/PermissionRequest/Application/proguard-project.txt (renamed from ui/notifications/CustomNotifications/Application/proguard-project.txt)0
-rw-r--r--content/webview/PermissionRequest/Application/src/main/AndroidManifest.xml39
-rw-r--r--content/webview/PermissionRequest/Application/src/main/assets/sample.css36
-rw-r--r--content/webview/PermissionRequest/Application/src/main/assets/sample.html31
-rw-r--r--content/webview/PermissionRequest/Application/src/main/assets/sample.js56
-rw-r--r--content/webview/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/ConfirmationDialogFragment.java79
-rw-r--r--content/webview/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/PermissionRequestFragment.java180
-rw-r--r--content/webview/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/SimpleWebServer.java222
-rw-r--r--content/webview/PermissionRequest/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 5409 bytes
-rw-r--r--content/webview/PermissionRequest/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 3204 bytes
-rw-r--r--content/webview/PermissionRequest/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 7793 bytes
-rw-r--r--content/webview/PermissionRequest/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 13799 bytes
-rw-r--r--content/webview/PermissionRequest/Application/src/main/res/layout/fragment_permission_request.xml27
-rw-r--r--content/webview/PermissionRequest/Application/src/main/res/values/strings.xml21
-rw-r--r--content/webview/PermissionRequest/Application/tests/src/com/example/android/permissionrequest/test/SampleTests.java196
-rw-r--r--content/webview/PermissionRequest/build.gradle11
-rw-r--r--content/webview/PermissionRequest/buildSrc/build.gradle15
-rw-r--r--content/webview/PermissionRequest/gradle/wrapper/gradle-wrapper.jar (renamed from ui/notifications/LNotifications/gradle/wrapper/gradle-wrapper.jar)bin49896 -> 49896 bytes
-rw-r--r--content/webview/PermissionRequest/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xcontent/webview/PermissionRequest/gradlew (renamed from ui/notifications/LNotifications/gradlew)0
-rw-r--r--content/webview/PermissionRequest/gradlew.bat (renamed from ui/notifications/LNotifications/gradlew.bat)0
-rw-r--r--content/webview/PermissionRequest/screenshots/icon_web.pngbin0 -> 87912 bytes
-rw-r--r--content/webview/PermissionRequest/screenshots/image1.pngbin0 -> 92266 bytes
-rw-r--r--content/webview/PermissionRequest/screenshots/image2.pngbin0 -> 566711 bytes
-rw-r--r--content/webview/PermissionRequest/settings.gradle (renamed from ui/notifications/LNotifications/settings.gradle)0
-rw-r--r--content/webview/PermissionRequest/template-params.xml103
-rw-r--r--experimental/ndkSampleGen/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--input/gestures/BasicGestureDetect/screenshots/1-main.pngbin0 -> 67342 bytes
-rw-r--r--input/gestures/BasicGestureDetect/screenshots/icon-web.pngbin0 -> 75748 bytes
-rw-r--r--input/gestures/BasicGestureDetect/template-params.xml38
-rw-r--r--input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--input/multitouch/BasicMultitouch/screenshots/icon-web.pngbin0 -> 74754 bytes
-rw-r--r--input/multitouch/BasicMultitouch/screenshots/intro.pngbin0 -> 80551 bytes
-rw-r--r--input/multitouch/BasicMultitouch/screenshots/touches.pngbin0 -> 31499 bytes
-rw-r--r--input/multitouch/BasicMultitouch/template-params.xml47
-rw-r--r--media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/BasicMediaDecoder/screenshots/1-launch.pngbin0 -> 31394 bytes
-rw-r--r--media/BasicMediaDecoder/screenshots/2-play-video.pngbin0 -> 2019164 bytes
-rw-r--r--media/BasicMediaDecoder/screenshots/icon-web.pngbin0 -> 83691 bytes
-rw-r--r--media/BasicMediaDecoder/template-params.xml71
-rw-r--r--media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/Camera2BasicFragment.java54
-rw-r--r--media/Camera2Basic/README.md53
-rw-r--r--media/Camera2Basic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/Camera2Basic/screenshots/icon-web.pngbin0 -> 64937 bytes
-rw-r--r--media/Camera2Basic/screenshots/main.pngbin0 -> 1212538 bytes
-rw-r--r--media/Camera2Basic/template-params.xml64
-rw-r--r--media/Camera2Video/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/Camera2Video/screenshots/1-launch.pngbin0 -> 2329041 bytes
-rw-r--r--media/Camera2Video/screenshots/2-record.pngbin0 -> 2368599 bytes
-rw-r--r--media/Camera2Video/screenshots/3-save.pngbin0 -> 2183768 bytes
-rw-r--r--media/Camera2Video/screenshots/icon-web.pngbin0 -> 66500 bytes
-rw-r--r--media/Camera2Video/template-params.xml62
-rw-r--r--media/HdrViewfinder/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/MediaBrowserService/Application/.gitignore (renamed from ui/notifications/LNotifications/Application/.gitignore)0
-rw-r--r--media/MediaBrowserService/Application/proguard-project.txt (renamed from ui/notifications/LNotifications/Application/proguard-project.txt)0
-rw-r--r--media/MediaBrowserService/Application/src/androidTest/java/com/example/android/mediabrowserservice/test/SampleTests.java76
-rw-r--r--media/MediaBrowserService/Application/src/main/AndroidManifest.xml65
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/BrowseFragment.java210
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/MediaNotificationManager.java380
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/MusicPlayerActivity.java55
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/MusicService.java947
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/PackageValidator.java219
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/QueueAdapter.java82
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/QueueFragment.java295
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/model/MusicProvider.java296
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/BitmapHelper.java77
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/LogHelper.java87
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/MediaIDHelper.java88
-rw-r--r--media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/QueueHelper.java129
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 2051 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_notification.pngbin0 -> 4163 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_pause_white_24dp.pngbin0 -> 188 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.pngbin0 -> 282 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_shuffle_white_24dp.pngbin0 -> 458 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_skip_next_white_24dp.pngbin0 -> 291 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-hdpi/ic_skip_previous_white_24dp.pngbin0 -> 306 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 1545 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_equalizer_white_24dp.pngbin0 -> 207 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 2838 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_pause_white_24dp.pngbin0 -> 193 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.pngbin0 -> 318 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_shuffle_white_24dp.pngbin0 -> 481 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_skip_next_white_24dp.pngbin0 -> 326 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xhdpi/ic_skip_previous_white_24dp.pngbin0 -> 354 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_by_genre.pngbin0 -> 1562 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_default_art.pngbin0 -> 1593 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_equalizer_white_24dp.pngbin0 -> 265 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 4437 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_pause_white_24dp.pngbin0 -> 215 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.pngbin0 -> 399 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_shuffle_white_24dp.pngbin0 -> 830 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_skip_next_white_24dp.pngbin0 -> 408 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_skip_previous_white_24dp.pngbin0 -> 447 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_star_off.pngbin0 -> 4835 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxhdpi/ic_star_on.pngbin0 -> 3309 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/drawable-xxxhdpi/ic_launcher.pngbin0 -> 5982 bytes
-rw-r--r--media/MediaBrowserService/Application/src/main/res/layout/activity_player.xml22
-rw-r--r--media/MediaBrowserService/Application/src/main/res/layout/fragment_list.xml60
-rw-r--r--media/MediaBrowserService/Application/src/main/res/layout/media_list_item.xml55
-rw-r--r--media/MediaBrowserService/Application/src/main/res/values-v21/styles.xml33
-rw-r--r--media/MediaBrowserService/Application/src/main/res/values/dimens.xml21
-rw-r--r--media/MediaBrowserService/Application/src/main/res/values/strings.xml33
-rw-r--r--media/MediaBrowserService/Application/src/main/res/values/strings_notifications.xml24
-rw-r--r--media/MediaBrowserService/Application/src/main/res/values/styles.xml26
-rw-r--r--media/MediaBrowserService/Application/src/main/res/xml/automotive_app_desc.xml19
-rw-r--r--media/MediaBrowserService/CONTRIB.md (renamed from ui/notifications/BasicNotifications/CONTRIB.md)0
-rw-r--r--media/MediaBrowserService/LICENSE (renamed from ui/notifications/CustomNotifications/LICENSE)0
-rw-r--r--media/MediaBrowserService/README.md58
-rw-r--r--media/MediaBrowserService/build.gradle11
-rw-r--r--media/MediaBrowserService/buildSrc/build.gradle15
-rw-r--r--media/MediaBrowserService/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--media/MediaBrowserService/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xmedia/MediaBrowserService/gradlew164
-rw-r--r--media/MediaBrowserService/gradlew.bat90
-rw-r--r--media/MediaBrowserService/packaging.yaml15
-rw-r--r--media/MediaBrowserService/screenshots/1-main.pngbin0 -> 45426 bytes
-rw-r--r--media/MediaBrowserService/screenshots/2-music-play.pngbin0 -> 73643 bytes
-rw-r--r--media/MediaBrowserService/screenshots/3-music-notification.pngbin0 -> 174696 bytes
-rw-r--r--media/MediaBrowserService/screenshots/icon-web.pngbin0 -> 19980 bytes
-rw-r--r--media/MediaBrowserService/settings.gradle2
-rw-r--r--media/MediaBrowserService/template-params.xml131
-rw-r--r--media/MediaEffects/Application/.gitignore (renamed from wearable/wear/AgendaData/Shared/.gitignore)0
-rw-r--r--media/MediaEffects/Application/README-fragmentview.txt37
-rw-r--r--media/MediaEffects/Application/proguard-project.txt20
-rw-r--r--media/MediaEffects/Application/src/main/AndroidManifest.xml (renamed from media/MediaEffects/MediaEffectsSample/src/main/AndroidManifest.xml)0
-rw-r--r--media/MediaEffects/Application/src/main/java/com/example/android/mediaeffects/GLToolbox.java (renamed from media/MediaEffects/MediaEffectsSample/src/main/java/com/example/android/mediaeffects/GLToolbox.java)0
-rw-r--r--media/MediaEffects/Application/src/main/java/com/example/android/mediaeffects/MediaEffectsFragment.java (renamed from media/MediaEffects/MediaEffectsSample/src/main/java/com/example/android/mediaeffects/MediaEffectsFragment.java)0
-rw-r--r--media/MediaEffects/Application/src/main/java/com/example/android/mediaeffects/TextureRenderer.java (renamed from media/MediaEffects/MediaEffectsSample/src/main/java/com/example/android/mediaeffects/TextureRenderer.java)0
-rw-r--r--media/MediaEffects/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4360 bytes
-rw-r--r--media/MediaEffects/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2684 bytes
-rw-r--r--media/MediaEffects/Application/src/main/res/drawable-nodpi/puppy.jpg (renamed from media/MediaEffects/MediaEffectsSample/src/main/res/drawable-nodpi/puppy.jpg)bin73836 -> 73836 bytes
-rw-r--r--media/MediaEffects/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6178 bytes
-rw-r--r--media/MediaEffects/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 10820 bytes
-rw-r--r--media/MediaEffects/Application/src/main/res/layout/fragment_media_effects.xml (renamed from media/MediaEffects/MediaEffectsSample/src/main/res/layout/fragment_media_effects.xml)0
-rw-r--r--media/MediaEffects/Application/src/main/res/menu/media_effects.xml (renamed from media/MediaEffects/MediaEffectsSample/src/main/res/menu/media_effects.xml)0
-rw-r--r--media/MediaEffects/Application/src/main/res/values/strings.xml (renamed from media/MediaEffects/MediaEffectsSample/src/main/res/values/strings.xml)0
-rw-r--r--media/MediaEffects/MediaEffectsSample/README-fragmentview.txt37
-rw-r--r--media/MediaEffects/MediaEffectsSample/src/main/res/drawable-hdpi/ic_launcher.pngbin4781 -> 0 bytes
-rw-r--r--media/MediaEffects/MediaEffectsSample/src/main/res/drawable-mdpi/ic_launcher.pngbin2872 -> 0 bytes
-rw-r--r--media/MediaEffects/MediaEffectsSample/src/main/res/drawable-xhdpi/ic_launcher.pngbin6655 -> 0 bytes
-rw-r--r--media/MediaEffects/MediaEffectsSample/src/main/res/drawable-xxhdpi/ic_launcher.pngbin11507 -> 0 bytes
-rw-r--r--media/MediaEffects/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/MediaEffects/screenshots/duotone.pngbin0 -> 616457 bytes
-rw-r--r--media/MediaEffects/screenshots/icon-web.pngbin0 -> 68334 bytes
-rw-r--r--media/MediaEffects/screenshots/menu.pngbin0 -> 554410 bytes
-rw-r--r--media/MediaEffects/settings.gradle5
-rw-r--r--media/MediaEffects/template-params.xml42
-rw-r--r--media/MediaRecorder/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin4512 -> 3925 bytes
-rw-r--r--media/MediaRecorder/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2719 -> 2388 bytes
-rw-r--r--media/MediaRecorder/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin6345 -> 5433 bytes
-rw-r--r--media/MediaRecorder/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin11620 -> 9657 bytes
-rw-r--r--media/MediaRecorder/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/MediaRecorder/packaging.yaml15
-rw-r--r--media/MediaRecorder/screenshots/big_icon.pngbin0 -> 58738 bytes
-rw-r--r--media/MediaRecorder/screenshots/screnshot1.pngbin0 -> 32245 bytes
-rw-r--r--media/MediaRecorder/screenshots/screnshot2.pngbin0 -> 771229 bytes
-rw-r--r--media/MediaRecorder/template-params.xml59
-rw-r--r--media/MediaRouter/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--media/MediaRouter/template-params.xml4
-rw-r--r--media/ScreenCapture/Application/.gitignore (renamed from wearable/wear/DataLayer/Shared/.gitignore)0
-rw-r--r--media/ScreenCapture/Application/README-fragmentview.txt37
-rw-r--r--media/ScreenCapture/Application/README-singleview.txt47
-rw-r--r--media/ScreenCapture/Application/proguard-project.txt20
-rw-r--r--media/ScreenCapture/Application/src/main/AndroidManifest.xml34
-rw-r--r--media/ScreenCapture/Application/src/main/java/com/example/android/screencapture/ScreenCaptureFragment.java202
-rw-r--r--media/ScreenCapture/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4972 bytes
-rw-r--r--media/ScreenCapture/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2932 bytes
-rw-r--r--media/ScreenCapture/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 7092 bytes
-rw-r--r--media/ScreenCapture/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 12718 bytes
-rw-r--r--media/ScreenCapture/Application/src/main/res/layout/fragment_screen_capture.xml36
-rw-r--r--media/ScreenCapture/Application/src/main/res/values/strings.xml21
-rw-r--r--media/ScreenCapture/Application/tests/src/com/example/android/screencapture/test/SampleTests.java62
-rw-r--r--media/ScreenCapture/build.gradle11
-rw-r--r--media/ScreenCapture/buildSrc/build.gradle15
-rw-r--r--media/ScreenCapture/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--media/ScreenCapture/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xmedia/ScreenCapture/gradlew164
-rw-r--r--media/ScreenCapture/gradlew.bat90
-rw-r--r--media/ScreenCapture/screenshots/icon-web.pngbin0 -> 81953 bytes
-rw-r--r--media/ScreenCapture/screenshots/main.pngbin0 -> 150405 bytes
-rw-r--r--media/ScreenCapture/settings.gradle1
-rw-r--r--media/ScreenCapture/template-params.xml82
-rw-r--r--notification/BasicNotifications/Application/.gitignore (renamed from wearable/wear/DelayedConfirmation/Shared/.gitignore)0
-rw-r--r--notification/BasicNotifications/Application/proguard-project.txt20
-rw-r--r--notification/BasicNotifications/Application/src/main/AndroidManifest.xml (renamed from ui/notifications/BasicNotifications/Application/src/main/AndroidManifest.xml)0
-rwxr-xr-xnotification/BasicNotifications/Application/src/main/big_icon.pngbin0 -> 72943 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/java/com/example/android/basicnotifications/MainActivity.java (renamed from ui/notifications/BasicNotifications/Application/src/main/java/com/example/android/basicnotifications/MainActivity.java)0
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-hdpi-v11/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-hdpi-v11/ic_stat_notification.png)bin313 -> 313 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-hdpi-v9/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-hdpi-v9/ic_stat_notification.png)bin380 -> 380 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-hdpi/ic_launcher.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-hdpi/ic_launcher.png)bin4162 -> 4162 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-hdpi/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-hdpi/ic_stat_notification.png)bin945 -> 945 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-ldpi-v11/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-ldpi-v11/ic_stat_notification.png)bin190 -> 190 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-ldpi-v9/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-ldpi-v9/ic_stat_notification.png)bin238 -> 238 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-mdpi-v11/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-mdpi-v11/ic_stat_notification.png)bin238 -> 238 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-mdpi-v9/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-mdpi-v9/ic_stat_notification.png)bin256 -> 256 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-mdpi/ic_launcher.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-mdpi/ic_launcher.png)bin2494 -> 2494 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-mdpi/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-mdpi/ic_stat_notification.png)bin672 -> 672 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png)bin413 -> 413 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png)bin455 -> 455 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher.png)bin5961 -> 5961 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-xhdpi/ic_stat_notification.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-xhdpi/ic_stat_notification.png)bin1331 -> 1331 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher.png (renamed from ui/notifications/BasicNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher.png)bin10926 -> 10926 bytes
-rw-r--r--notification/BasicNotifications/Application/src/main/res/layout/sample_layout.xml (renamed from ui/notifications/BasicNotifications/Application/src/main/res/layout/sample_layout.xml)0
-rw-r--r--notification/BasicNotifications/Application/src/main/res/values/strings.xml (renamed from ui/notifications/BasicNotifications/Application/src/main/res/values/strings.xml)0
-rw-r--r--notification/BasicNotifications/Application/tests/AndroidManifest.xml (renamed from ui/notifications/BasicNotifications/Application/tests/AndroidManifest.xml)0
-rw-r--r--notification/BasicNotifications/Application/tests/src/com/example/android/basicnotifications/tests/SampleTests.java (renamed from ui/notifications/BasicNotifications/Application/tests/src/com/example/android/basicnotifications/tests/SampleTests.java)0
-rw-r--r--notification/BasicNotifications/CONTRIB.md (renamed from ui/notifications/CustomNotifications/CONTRIB.md)0
-rw-r--r--notification/BasicNotifications/LICENSE201
-rw-r--r--notification/BasicNotifications/README.md (renamed from ui/notifications/BasicNotifications/README.md)0
-rw-r--r--notification/BasicNotifications/build.gradle11
-rw-r--r--notification/BasicNotifications/buildSrc/build.gradle15
-rw-r--r--notification/BasicNotifications/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--notification/BasicNotifications/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xnotification/BasicNotifications/gradlew164
-rw-r--r--notification/BasicNotifications/gradlew.bat90
-rw-r--r--notification/BasicNotifications/packaging.yaml (renamed from ui/notifications/BasicNotifications/packaging.yaml)0
-rw-r--r--notification/BasicNotifications/screenshots/main.pngbin0 -> 261490 bytes
-rw-r--r--notification/BasicNotifications/settings.gradle1
-rw-r--r--notification/BasicNotifications/template-params.xml104
-rw-r--r--notification/CustomNotifications/Application/.gitignore (renamed from wearable/wear/ElizaChat/Shared/.gitignore)0
-rw-r--r--notification/CustomNotifications/Application/proguard-project.txt20
-rw-r--r--notification/CustomNotifications/Application/src/main/AndroidManifest.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/AndroidManifest.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/java/com/example/android/customnotifications/MainActivity.java (renamed from ui/notifications/CustomNotifications/Application/src/main/java/com/example/android/customnotifications/MainActivity.java)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-hdpi-v11/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-hdpi-v11/ic_stat_custom.png)bin903 -> 903 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-hdpi-v9/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-hdpi-v9/ic_stat_custom.png)bin1038 -> 1038 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-hdpi/ic_launcher.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-hdpi/ic_launcher.png)bin4968 -> 4968 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-hdpi/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-hdpi/ic_stat_custom.png)bin1705 -> 1705 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-ldpi-v11/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-ldpi-v11/ic_stat_custom.png)bin393 -> 393 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-ldpi-v9/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-ldpi-v9/ic_stat_custom.png)bin469 -> 469 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-mdpi-v11/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-mdpi-v11/ic_stat_custom.png)bin541 -> 541 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-mdpi-v9/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-mdpi-v9/ic_stat_custom.png)bin637 -> 637 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-mdpi/ic_launcher.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-mdpi/ic_launcher.png)bin2981 -> 2981 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-mdpi/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-mdpi/ic_stat_custom.png)bin1040 -> 1040 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png)bin1159 -> 1159 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png)bin1469 -> 1469 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher.png)bin7165 -> 7165 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xhdpi/ic_stat_custom.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xhdpi/ic_stat_custom.png)bin2340 -> 2340 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xhdpi/robot.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xhdpi/robot.png)bin5496 -> 5496 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xhdpi/robot_expanded.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xhdpi/robot_expanded.png)bin18427 -> 18427 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher.png (renamed from ui/notifications/CustomNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher.png)bin12523 -> 12523 bytes
-rw-r--r--notification/CustomNotifications/Application/src/main/res/layout/notification.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/layout/notification.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/layout/notification_expanded.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/layout/notification_expanded.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/layout/sample_main.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/layout/sample_main.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/values-sw720dp-land/dimens.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/values-sw720dp-land/dimens.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/values-v9/styles.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/values-v9/styles.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/values/dimens.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/values/dimens.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/values/strings.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/values/strings.xml)0
-rw-r--r--notification/CustomNotifications/Application/src/main/res/values/styles.xml (renamed from ui/notifications/CustomNotifications/Application/src/main/res/values/styles.xml)0
-rw-r--r--notification/CustomNotifications/CONTRIB.md35
-rw-r--r--notification/CustomNotifications/LICENSE201
-rw-r--r--notification/CustomNotifications/README.md (renamed from ui/notifications/CustomNotifications/README.md)0
-rw-r--r--notification/CustomNotifications/build.gradle11
-rw-r--r--notification/CustomNotifications/buildSrc/build.gradle15
-rw-r--r--notification/CustomNotifications/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--notification/CustomNotifications/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xnotification/CustomNotifications/gradlew164
-rw-r--r--notification/CustomNotifications/gradlew.bat90
-rw-r--r--notification/CustomNotifications/packaging.yaml (renamed from ui/notifications/CustomNotifications/packaging.yaml)0
-rw-r--r--notification/CustomNotifications/screenshots/icon-web.pngbin0 -> 78468 bytes
-rw-r--r--notification/CustomNotifications/screenshots/main-notification.pngbin0 -> 181043 bytes
-rw-r--r--notification/CustomNotifications/screenshots/notification.pngbin0 -> 180128 bytes
-rw-r--r--notification/CustomNotifications/settings.gradle1
-rw-r--r--notification/CustomNotifications/template-params.xml79
-rw-r--r--notification/LNotifications/Application/.gitignore (renamed from wearable/wear/EmbeddedApp/Shared/.gitignore)0
-rw-r--r--notification/LNotifications/Application/proguard-project.txt20
-rw-r--r--notification/LNotifications/Application/src/main/AndroidManifest.xml (renamed from ui/notifications/LNotifications/Application/src/main/AndroidManifest.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/java/com/example/android/lnotifications/HeadsUpNotificationFragment.java (renamed from ui/notifications/LNotifications/Application/src/main/java/com/example/android/lnotifications/HeadsUpNotificationFragment.java)0
-rw-r--r--notification/LNotifications/Application/src/main/java/com/example/android/lnotifications/LNotificationActivity.java (renamed from ui/notifications/LNotifications/Application/src/main/java/com/example/android/lnotifications/LNotificationActivity.java)0
-rw-r--r--notification/LNotifications/Application/src/main/java/com/example/android/lnotifications/OtherMetadataFragment.java (renamed from ui/notifications/LNotifications/Application/src/main/java/com/example/android/lnotifications/OtherMetadataFragment.java)0
-rw-r--r--notification/LNotifications/Application/src/main/java/com/example/android/lnotifications/VisibilityMetadataFragment.java (renamed from ui/notifications/LNotifications/Application/src/main/java/com/example/android/lnotifications/VisibilityMetadataFragment.java)0
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_contact_picture.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_contact_picture.png)bin1575 -> 1575 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_launcher.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_launcher.png)bin5306 -> 5306 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_launcher_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_launcher_notification.png)bin591 -> 591 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_private.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_private.png)bin657 -> 657 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_private_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_private_notification.png)bin506 -> 506 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_public.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_public.png)bin2091 -> 2091 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_public_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_public_notification.png)bin1482 -> 1482 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_secret.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_secret.png)bin997 -> 997 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-hdpi/ic_secret_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-hdpi/ic_secret_notification.png)bin735 -> 735 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_contact_picture.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_contact_picture.png)bin959 -> 959 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_launcher.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_launcher.png)bin3144 -> 3144 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_launcher_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_launcher_notification.png)bin401 -> 401 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_private.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_private.png)bin454 -> 454 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_private_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_private_notification.png)bin341 -> 341 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_public.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_public.png)bin1298 -> 1298 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_public_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_public_notification.png)bin855 -> 855 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_secret.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_secret.png)bin692 -> 692 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-mdpi/ic_secret_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-mdpi/ic_secret_notification.png)bin501 -> 501 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_contact_picture.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_contact_picture.png)bin2451 -> 2451 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher.png)bin7586 -> 7586 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_launcher_notification.png)bin849 -> 849 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_private.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_private.png)bin866 -> 866 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_private_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_private_notification.png)bin686 -> 686 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_public.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_public.png)bin3044 -> 3044 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_public_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_public_notification.png)bin2189 -> 2189 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_secret.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_secret.png)bin1289 -> 1289 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xhdpi/ic_secret_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xhdpi/ic_secret_notification.png)bin955 -> 955 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_contact_picture.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_contact_picture.png)bin3267 -> 3267 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher.png)bin13499 -> 13499 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_launcher_notification.png)bin1456 -> 1456 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_private.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_private.png)bin1270 -> 1270 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_private_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_private_notification.png)bin930 -> 930 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_public.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_public.png)bin5025 -> 5025 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_public_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_public_notification.png)bin3690 -> 3690 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_secret.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_secret.png)bin1965 -> 1965 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_secret_notification.png (renamed from ui/notifications/LNotifications/Application/src/main/res/drawable-xxhdpi/ic_secret_notification.png)bin1529 -> 1529 bytes
-rw-r--r--notification/LNotifications/Application/src/main/res/layout/activity_notification.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/layout/activity_notification.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/layout/contact_entry.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/layout/contact_entry.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/layout/fragment_heads_up_notification.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/layout/fragment_heads_up_notification.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/layout/fragment_other_metadata.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/layout/fragment_other_metadata.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/layout/fragment_visibility_metadata_notification.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/layout/fragment_visibility_metadata_notification.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/values/colors.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/values/colors.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/values/dimens.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/values/dimens.xml)0
-rw-r--r--notification/LNotifications/Application/src/main/res/values/strings.xml (renamed from ui/notifications/LNotifications/Application/src/main/res/values/strings.xml)0
-rw-r--r--notification/LNotifications/Application/tests/AndroidManifest.xml (renamed from ui/notifications/LNotifications/Application/tests/AndroidManifest.xml)0
-rw-r--r--notification/LNotifications/Application/tests/src/com/example/android/lnotifications/HeadsUpNotificationFragmentTest.java (renamed from ui/notifications/LNotifications/Application/tests/src/com/example/android/lnotifications/HeadsUpNotificationFragmentTest.java)0
-rw-r--r--notification/LNotifications/Application/tests/src/com/example/android/lnotifications/LNotificationActivityTest.java (renamed from ui/notifications/LNotifications/Application/tests/src/com/example/android/lnotifications/LNotificationActivityTest.java)0
-rw-r--r--notification/LNotifications/Application/tests/src/com/example/android/lnotifications/OtherMetadataFragmentTest.java (renamed from ui/notifications/LNotifications/Application/tests/src/com/example/android/lnotifications/OtherMetadataFragmentTest.java)0
-rw-r--r--notification/LNotifications/Application/tests/src/com/example/android/lnotifications/VisibilityMetadataFragmentTest.java (renamed from ui/notifications/LNotifications/Application/tests/src/com/example/android/lnotifications/VisibilityMetadataFragmentTest.java)0
-rw-r--r--notification/LNotifications/CONTRIB.md35
-rw-r--r--notification/LNotifications/LICENSE201
-rw-r--r--notification/LNotifications/README.md (renamed from ui/notifications/LNotifications/README.md)0
-rw-r--r--notification/LNotifications/build.gradle11
-rw-r--r--notification/LNotifications/buildSrc/build.gradle15
-rw-r--r--notification/LNotifications/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--notification/LNotifications/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xnotification/LNotifications/gradlew164
-rw-r--r--notification/LNotifications/gradlew.bat90
-rw-r--r--notification/LNotifications/packaging.yaml (renamed from ui/notifications/LNotifications/packaging.yaml)0
-rw-r--r--notification/LNotifications/screenshots/1-headsup.pngbin0 -> 128403 bytes
-rw-r--r--notification/LNotifications/screenshots/2-visibility.pngbin0 -> 136092 bytes
-rw-r--r--notification/LNotifications/screenshots/3-others.pngbin0 -> 115027 bytes
-rw-r--r--notification/LNotifications/screenshots/icon-web.pngbin0 -> 86376 bytes
-rw-r--r--notification/LNotifications/settings.gradle1
-rw-r--r--notification/LNotifications/template-params.xml83
-rw-r--r--notification/MessagingService/Application/.gitignore (renamed from wearable/wear/FindMyPhone/Shared/.gitignore)0
-rw-r--r--notification/MessagingService/Application/proguard-project.txt20
-rw-r--r--notification/MessagingService/Application/src/androidTest/java/com/example/android/messagingservice/test/SampleTests.java76
-rw-r--r--notification/MessagingService/Application/src/main/AndroidManifest.xml52
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/Conversations.java126
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/MainActivity.java34
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/MessageLogger.java57
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/MessageReadReceiver.java42
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/MessageReplyReceiver.java58
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/MessagingFragment.java170
-rw-r--r--notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/MessagingService.java174
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-hdpi/android_contact.pngbin0 -> 1575 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4801 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-hdpi/notification_icon.pngbin0 -> 937 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-mdpi/android_contact.pngbin0 -> 959 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2956 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-mdpi/notification_icon.pngbin0 -> 609 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-xhdpi/android_contact.pngbin0 -> 2451 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6724 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-xhdpi/notification_icon.pngbin0 -> 1233 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-xxhdpi/android_contact.pngbin0 -> 3267 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11883 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/drawable-xxhdpi/notification_icon.pngbin0 -> 1973 bytes
-rw-r--r--notification/MessagingService/Application/src/main/res/layout-land/fragment_message_me.xml66
-rw-r--r--notification/MessagingService/Application/src/main/res/layout/activity_main.xml22
-rw-r--r--notification/MessagingService/Application/src/main/res/layout/fragment_message_me.xml57
-rw-r--r--notification/MessagingService/Application/src/main/res/values-v21/styles.xml22
-rw-r--r--notification/MessagingService/Application/src/main/res/values/colors.xml20
-rw-r--r--notification/MessagingService/Application/src/main/res/values/dimens.xml21
-rw-r--r--notification/MessagingService/Application/src/main/res/values/strings.xml26
-rw-r--r--notification/MessagingService/Application/src/main/res/values/styles.xml20
-rw-r--r--notification/MessagingService/Application/src/main/res/xml/automotive_app_desc.xml19
-rw-r--r--notification/MessagingService/CONTRIB.md35
-rw-r--r--notification/MessagingService/LICENSE201
-rw-r--r--notification/MessagingService/README.md86
-rw-r--r--notification/MessagingService/build.gradle11
-rw-r--r--notification/MessagingService/buildSrc/build.gradle15
-rw-r--r--notification/MessagingService/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--notification/MessagingService/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xnotification/MessagingService/gradlew164
-rw-r--r--notification/MessagingService/gradlew.bat90
-rw-r--r--notification/MessagingService/packaging.yaml15
-rw-r--r--notification/MessagingService/screenshots/1-main.pngbin0 -> 36544 bytes
-rw-r--r--notification/MessagingService/screenshots/2-onemessage.pngbin0 -> 63049 bytes
-rw-r--r--notification/MessagingService/screenshots/2-threemessages.pngbin0 -> 91906 bytes
-rw-r--r--notification/MessagingService/screenshots/icon-web.pngbin0 -> 73624 bytes
-rw-r--r--notification/MessagingService/settings.gradle1
-rw-r--r--notification/MessagingService/template-params.xml99
-rw-r--r--renderScript/BasicRenderScript/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--renderScript/BasicRenderScript/screenshots/icon-web.pngbin0 -> 69040 bytes
-rw-r--r--renderScript/BasicRenderScript/screenshots/main.pngbin0 -> 1558709 bytes
-rw-r--r--renderScript/BasicRenderScript/template-params.xml51
-rw-r--r--renderScript/RenderScriptIntrinsic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--renderScript/RenderScriptIntrinsic/screenshots/icon-web.pngbin0 -> 68679 bytes
-rw-r--r--renderScript/RenderScriptIntrinsic/screenshots/main.pngbin0 -> 1887670 bytes
-rw-r--r--renderScript/RenderScriptIntrinsic/template-params.xml59
-rw-r--r--security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--security/keystore/BasicAndroidKeyStore/packaging.yaml15
-rw-r--r--security/keystore/BasicAndroidKeyStore/screenshots/big_icon.pngbin0 -> 75125 bytes
-rw-r--r--security/keystore/BasicAndroidKeyStore/screenshots/screenshot1.pngbin0 -> 59168 bytes
-rw-r--r--security/keystore/BasicAndroidKeyStore/screenshots/screenshot2.pngbin0 -> 44232 bytes
-rw-r--r--security/keystore/BasicAndroidKeyStore/screenshots/screenshot3.pngbin0 -> 102011 bytes
-rw-r--r--security/keystore/BasicAndroidKeyStore/screenshots/screenshot4.pngbin0 -> 91903 bytes
-rw-r--r--security/keystore/BasicAndroidKeyStore/screenshots/screenshot5.pngbin0 -> 88519 bytes
-rw-r--r--security/keystore/BasicAndroidKeyStore/template-params.xml57
-rw-r--r--sensors/BatchStepSensor/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--sensors/BatchStepSensor/packaging.yaml2
-rw-r--r--sensors/BatchStepSensor/screenshots/big_icon.pngbin0 -> 72006 bytes
-rw-r--r--sensors/BatchStepSensor/screenshots/screenshot1.pngbin0 -> 301385 bytes
-rw-r--r--sensors/BatchStepSensor/screenshots/screenshot2.pngbin0 -> 224367 bytes
-rw-r--r--sensors/BatchStepSensor/screenshots/screenshot3.pngbin0 -> 153288 bytes
-rw-r--r--sensors/BatchStepSensor/screenshots/screenshot4.pngbin0 -> 198321 bytes
-rw-r--r--sensors/BatchStepSensor/screenshots/screenshot5.pngbin0 -> 154463 bytes
-rw-r--r--sensors/BatchStepSensor/template-params.xml71
-rw-r--r--system/AppUsageStatistics/Application/.gitignore (renamed from wearable/wear/Flashlight/Shared/.gitignore)0
-rw-r--r--system/AppUsageStatistics/Application/proguard-project.txt20
-rw-r--r--system/AppUsageStatistics/Application/src/main/AndroidManifest.xml37
-rw-r--r--system/AppUsageStatistics/Application/src/main/java/com/example/android/appusagestatistics/AppUsageStatisticsActivity.java37
-rw-r--r--system/AppUsageStatistics/Application/src/main/java/com/example/android/appusagestatistics/AppUsageStatisticsFragment.java233
-rw-r--r--system/AppUsageStatistics/Application/src/main/java/com/example/android/appusagestatistics/CustomUsageStats.java28
-rw-r--r--system/AppUsageStatistics/Application/src/main/java/com/example/android/appusagestatistics/UsageListAdapter.java95
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/drawable-hdpi/ic_default_app_launcher.pngbin0 -> 9397 bytes
-rwxr-xr-xsystem/AppUsageStatistics/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4248 bytes
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/drawable-mdpi/ic_default_app_launcher.pngbin0 -> 5237 bytes
-rwxr-xr-xsystem/AppUsageStatistics/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2678 bytes
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/drawable-xhdpi/ic_default_app_launcher.pngbin0 -> 14383 bytes
-rwxr-xr-xsystem/AppUsageStatistics/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6126 bytes
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/drawable-xxhdpi/ic_default_app_launcher.pngbin0 -> 19388 bytes
-rwxr-xr-xsystem/AppUsageStatistics/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11029 bytes
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/layout/activity_app_usage_statistics.xml23
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/layout/fragment_app_usage_statistics.xml55
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/layout/usage_row.xml72
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/values/dimens.xml20
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/values/navigation_items.xml24
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/values/strings.xml25
-rw-r--r--system/AppUsageStatistics/Application/src/main/res/values/styles.xml21
-rw-r--r--system/AppUsageStatistics/Application/tests/src/com/example/android/appusagestatistics/AppUsageStatisticsActivityTests.java70
-rw-r--r--system/AppUsageStatistics/Application/tests/src/com/example/android/appusagestatistics/AppUsageStatisticsFragmentTests.java97
-rw-r--r--system/AppUsageStatistics/build.gradle11
-rw-r--r--system/AppUsageStatistics/buildSrc/build.gradle15
-rw-r--r--system/AppUsageStatistics/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--system/AppUsageStatistics/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xsystem/AppUsageStatistics/gradlew164
-rw-r--r--system/AppUsageStatistics/gradlew.bat90
-rw-r--r--system/AppUsageStatistics/screenshots/screenshot-1.pngbin0 -> 305215 bytes
-rw-r--r--system/AppUsageStatistics/screenshots/screenshot-2.pngbin0 -> 315711 bytes
-rwxr-xr-xsystem/AppUsageStatistics/screenshots/web-icon.pngbin0 -> 71167 bytes
-rw-r--r--system/AppUsageStatistics/settings.gradle1
-rw-r--r--system/AppUsageStatistics/template-params.xml104
-rw-r--r--testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/DrawableTinting/Application/build.gradle2
-rw-r--r--ui/DrawableTinting/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/Interpolator/after.pngbin0 -> 89571 bytes
-rw-r--r--ui/Interpolator/before.pngbin0 -> 89544 bytes
-rw-r--r--ui/Interpolator/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/Interpolator/screenshots/icon-web.pngbin0 -> 70869 bytes
-rw-r--r--ui/Interpolator/template-params.xml41
-rw-r--r--ui/accessibility/BasicAccessibility/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin3483 -> 3889 bytes
-rw-r--r--ui/accessibility/BasicAccessibility/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2304 -> 2533 bytes
-rw-r--r--ui/accessibility/BasicAccessibility/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin4379 -> 5270 bytes
-rw-r--r--ui/accessibility/BasicAccessibility/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin6307 -> 9309 bytes
-rw-r--r--ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/accessibility/BasicAccessibility/screenshots/icon-web.pngbin0 -> 59688 bytes
-rw-r--r--ui/accessibility/BasicAccessibility/screenshots/main.pngbin0 -> 174644 bytes
-rw-r--r--ui/accessibility/BasicAccessibility/template-params.xml35
-rw-r--r--ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/actionbar/DoneBar/screenshots/1-main.pngbin0 -> 176251 bytes
-rw-r--r--ui/actionbar/DoneBar/screenshots/2-done-bar.pngbin0 -> 81042 bytes
-rw-r--r--ui/actionbar/DoneBar/screenshots/3-done-button.pngbin0 -> 87721 bytes
-rw-r--r--ui/actionbar/DoneBar/screenshots/icon-web.pngbin0 -> 74296 bytes
-rw-r--r--ui/actionbar/DoneBar/template-params.xml44
-rw-r--r--ui/actionbarcompat/ActionBarCompat-Basic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/actionbarcompat/ActionBarCompat-Basic/screenshots/big_icon.pngbin0 -> 78277 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-Basic/screenshots/screenshot1.pngbin0 -> 33340 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-Basic/screenshots/screenshot2.pngbin0 -> 35878 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-Basic/template-params.xml60
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListPopupMenu/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListPopupMenu/screenshots/1-main.pngbin0 -> 82931 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListPopupMenu/screenshots/2-popup.pngbin0 -> 86469 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListPopupMenu/screenshots/icon-web.pngbin0 -> 40502 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListPopupMenu/template-params.xml36
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListViewModalSelect/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ListViewModalSelect/template-params.xml2
-rw-r--r--ui/actionbarcompat/ActionBarCompat-SearchView/build.gradle2
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ShareActionProvider/Application/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java28
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ShareActionProvider/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ShareActionProvider/screenshots/1-image.pngbin0 -> 593931 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ShareActionProvider/screenshots/2-text.pngbin0 -> 263870 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ShareActionProvider/screenshots/icon-web.pngbin0 -> 72610 bytes
-rw-r--r--ui/actionbarcompat/ActionBarCompat-ShareActionProvider/template-params.xml39
-rw-r--r--ui/actionbarcompat/ActionBarCompat-Styled/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/libs/volley.jarbin86659 -> 0 bytes
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/java/com/example/android/activityscenetransitionbasic/DetailActivity.java118
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/java/com/example/android/activityscenetransitionbasic/ImageMemoryCache.java96
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/java/com/example/android/activityscenetransitionbasic/MainActivity.java44
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/res/layout/details.xml2
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/res/layout/grid_item.xml2
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/res/transition/grid_detail_transition.xml28
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/res/values-v21/styles.xml3
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/res/values/strings.xml15
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/screenshots/1-main.pngbin0 -> 2397530 bytes
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/screenshots/2-transition.pngbin0 -> 2541113 bytes
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/screenshots/3-transition.pngbin0 -> 2139052 bytes
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/screenshots/4-detail.pngbin0 -> 2037998 bytes
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/screenshots/icon-web.pngbin0 -> 79755 bytes
-rw-r--r--ui/activityscenetransition/ActivitySceneTransitionBasic/template-params.xml46
-rw-r--r--ui/activitytasks/DocumentCentricApps/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin4199 -> 4307 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2535 -> 2711 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin6022 -> 5946 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin11040 -> 10359 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/activitytasks/DocumentCentricApps/screenshots/1-activity.pngbin0 -> 173299 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/screenshots/2-overview.pngbin0 -> 1111898 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/screenshots/big_icon.pngbin0 -> 65040 bytes
-rw-r--r--ui/activitytasks/DocumentCentricApps/template-params.xml42
-rw-r--r--ui/activitytasks/DocumentCentricRelinquishIdentity/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/graphics/DisplayingBitmaps/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/graphics/DisplayingBitmaps/screenshots/1-gridview.pngbin0 -> 622585 bytes
-rw-r--r--ui/graphics/DisplayingBitmaps/screenshots/2-detail.pngbin0 -> 212131 bytes
-rw-r--r--ui/graphics/DisplayingBitmaps/screenshots/icon-web.pngbin0 -> 70200 bytes
-rw-r--r--ui/graphics/DisplayingBitmaps/template-params.xml39
-rw-r--r--ui/graphics/PdfRendererBasic/gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xui/graphics/PdfRendererBasic/screenshots/icon-web.pngbin0 -> 60032 bytes
-rw-r--r--ui/graphics/PdfRendererBasic/screenshots/main.pngbin0 -> 410844 bytes
-rw-r--r--ui/graphics/PdfRendererBasic/template-params.xml51
-rw-r--r--ui/holo/BorderlessButtons/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin4199 -> 3885 bytes
-rw-r--r--ui/holo/BorderlessButtons/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2535 -> 2443 bytes
-rw-r--r--ui/holo/BorderlessButtons/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin6022 -> 5442 bytes
-rw-r--r--ui/holo/BorderlessButtons/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin11040 -> 9578 bytes
-rw-r--r--ui/holo/BorderlessButtons/README.md33
-rw-r--r--ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/holo/BorderlessButtons/screenshots/1-activity.png.pngbin0 -> 161826 bytes
-rw-r--r--ui/holo/BorderlessButtons/screenshots/big_icon.pngbin0 -> 59811 bytes
-rw-r--r--ui/holo/BorderlessButtons/template-params.xml40
-rw-r--r--ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/lists/CustomChoiceList/screenshots/icon-web.pngbin0 -> 38086 bytes
-rw-r--r--ui/lists/CustomChoiceList/screenshots/main.pngbin0 -> 180665 bytes
-rw-r--r--ui/lists/CustomChoiceList/template-params.xml64
-rw-r--r--ui/notifications/BasicNotifications/build.gradle10
-rw-r--r--ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties6
-rw-r--r--ui/notifications/BasicNotifications/template-params.xml36
-rw-r--r--ui/notifications/CustomNotifications/build.gradle10
-rw-r--r--ui/notifications/CustomNotifications/buildSrc/build.gradle18
-rw-r--r--ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties6
-rw-r--r--ui/notifications/CustomNotifications/template-params.xml35
-rw-r--r--ui/notifications/LNotifications/CONTRIB.md35
-rw-r--r--ui/notifications/LNotifications/LICENSE201
-rw-r--r--ui/notifications/LNotifications/buildSrc/build.gradle18
-rw-r--r--ui/notifications/LNotifications/gradle/wrapper/gradle-wrapper.properties6
-rw-r--r--ui/notifications/LNotifications/template-params.xml38
-rw-r--r--ui/transition/AdapterTransition/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/transition/BasicTransition/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/transition/BasicTransition/screenshots/icon-web.pngbin0 -> 70031 bytes
-rw-r--r--ui/transition/BasicTransition/screenshots/main.pngbin0 -> 131317 bytes
-rw-r--r--ui/transition/BasicTransition/template-params.xml52
-rw-r--r--ui/transition/CustomTransition/gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xui/transition/CustomTransition/screenshots/icon-web.pngbin0 -> 70316 bytes
-rw-r--r--ui/transition/CustomTransition/screenshots/main.pngbin0 -> 78484 bytes
-rw-r--r--ui/transition/CustomTransition/template-params.xml50
-rw-r--r--ui/transition/FragmentTransition/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/transition/FragmentTransition/screenshots/grid.pngbin0 -> 1874806 bytes
-rwxr-xr-xui/transition/FragmentTransition/screenshots/icon-web.pngbin0 -> 76702 bytes
-rw-r--r--ui/transition/FragmentTransition/screenshots/main.pngbin0 -> 1084693 bytes
-rw-r--r--ui/transition/FragmentTransition/template-params.xml46
-rw-r--r--ui/views/CardView/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/CardView/template-params.xml2
-rw-r--r--ui/views/Clipping/ClippingBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/Clipping/ClippingBasic/screenshots/screenshot-1.pngbin0 -> 145730 bytes
-rw-r--r--ui/views/Clipping/ClippingBasic/screenshots/screenshot-2.pngbin0 -> 148989 bytes
-rwxr-xr-xui/views/Clipping/ClippingBasic/screenshots/web-icon.pngbin0 -> 69934 bytes
-rw-r--r--ui/views/Clipping/ClippingBasic/template-params.xml63
-rw-r--r--ui/views/Elevation/ElevationBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/Elevation/ElevationBasic/screenshots/fixed.pngbin0 -> 88909 bytes
-rw-r--r--ui/views/Elevation/ElevationBasic/screenshots/icon-web.pngbin0 -> 68656 bytes
-rw-r--r--ui/views/Elevation/ElevationBasic/screenshots/raised.pngbin0 -> 95527 bytes
-rw-r--r--ui/views/Elevation/ElevationBasic/template-params.xml54
-rw-r--r--ui/views/Elevation/ElevationDrag/gradle/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/Elevation/ElevationDrag/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/Elevation/ElevationDrag/screenshots/1-main.pngbin0 -> 115783 bytes
-rw-r--r--ui/views/Elevation/ElevationDrag/screenshots/icon-web.pngbin0 -> 69081 bytes
-rw-r--r--ui/views/Elevation/ElevationDrag/template-params.xml37
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/Application/src/main/res/values/dimens.xml4
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/gradle/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/screenshots/big_icon.pngbin0 -> 79339 bytes
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/screenshots/screenshot1.pngbin0 -> 89093 bytes
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/screenshots/screenshot2.pngbin0 -> 89878 bytes
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/screenshots/screenshot3.pngbin0 -> 66974 bytes
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/screenshots/screenshot4.pngbin0 -> 80121 bytes
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/screenshots/screenshot5.pngbin0 -> 90784 bytes
-rw-r--r--ui/views/FloatingActionButton/FloatingActionButtonBasic/template-params.xml51
-rw-r--r--[-rwxr-xr-x]ui/views/HorizontalPaging/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin9397 -> 4135 bytes
-rw-r--r--[-rwxr-xr-x]ui/views/HorizontalPaging/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin5237 -> 2492 bytes
-rw-r--r--[-rwxr-xr-x]ui/views/HorizontalPaging/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin14383 -> 5828 bytes
-rw-r--r--ui/views/HorizontalPaging/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 10533 bytes
-rw-r--r--ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/HorizontalPaging/screenshots/1-tab1.pngbin0 -> 32046 bytes
-rw-r--r--ui/views/HorizontalPaging/screenshots/2-tab2.pngbin0 -> 32525 bytes
-rw-r--r--ui/views/HorizontalPaging/screenshots/icon-web.pngbin0 -> 65257 bytes
-rw-r--r--ui/views/HorizontalPaging/template-params.xml42
-rw-r--r--ui/views/NavigationDrawer/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/NavigationDrawer/template-params.xml7
-rw-r--r--ui/views/RecyclerView/Application/src/main/java/com/example/android/recyclerview/CustomAdapter.java27
-rw-r--r--ui/views/RecyclerView/Application/src/main/java/com/example/android/recyclerview/RecyclerViewFragment.java89
-rw-r--r--ui/views/RecyclerView/Application/src/main/res/layout/recycler_view_frag.xml22
-rw-r--r--ui/views/RecyclerView/Application/src/main/res/layout/text_row_item.xml19
-rw-r--r--ui/views/RecyclerView/Application/src/main/res/values/dimens.xml20
-rw-r--r--ui/views/RecyclerView/Application/src/main/res/values/strings.xml2
-rw-r--r--ui/views/RecyclerView/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/RecyclerView/template-params.xml17
-rw-r--r--ui/views/RevealEffect/RevealEffectBasic/gradle/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/RevealEffect/RevealEffectBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/SlidingTabs/SlidingTabsBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/SlidingTabs/SlidingTabsColors/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/SlidingTabs/SlidingTabsColors/screenshots/1-pre.pngbin0 -> 53815 bytes
-rw-r--r--ui/views/SlidingTabs/SlidingTabsColors/screenshots/2-morph.pngbin0 -> 53644 bytes
-rw-r--r--ui/views/SlidingTabs/SlidingTabsColors/screenshots/3-post.pngbin0 -> 52109 bytes
-rw-r--r--ui/views/SlidingTabs/SlidingTabsColors/template-params.xml41
-rw-r--r--ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/screenshots/icon-web.pngbin0 -> 74807 bytes
-rw-r--r--ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/screenshots/refresh.pngbin0 -> 123267 bytes
-rw-r--r--ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/template-params.xml42
-rw-r--r--ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/window/AdvancedImmersiveMode/screenshots/icon-web.pngbin0 -> 74446 bytes
-rw-r--r--ui/window/AdvancedImmersiveMode/screenshots/immersion.pngbin0 -> 111730 bytes
-rw-r--r--ui/window/AdvancedImmersiveMode/template-params.xml46
-rw-r--r--ui/window/BasicImmersiveMode/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin4199 -> 5096 bytes
-rw-r--r--ui/window/BasicImmersiveMode/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin2535 -> 2950 bytes
-rw-r--r--ui/window/BasicImmersiveMode/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin6022 -> 7309 bytes
-rw-r--r--ui/window/BasicImmersiveMode/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin11040 -> 12223 bytes
-rw-r--r--ui/window/BasicImmersiveMode/README.md29
-rw-r--r--ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/window/BasicImmersiveMode/screenshots/1-activity.pngbin0 -> 136294 bytes
-rw-r--r--ui/window/BasicImmersiveMode/screenshots/2-immersive.pngbin0 -> 155484 bytes
-rw-r--r--ui/window/BasicImmersiveMode/screenshots/big_icon.pngbin0 -> 71620 bytes
-rw-r--r--ui/window/BasicImmersiveMode/template-params.xml38
-rw-r--r--ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--ui/window/ImmersiveMode/template-params.xml2
-rw-r--r--views/TextLinkify/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--views/TextLinkify/screenshots/icon-web.pngbin0 -> 72560 bytes
-rw-r--r--views/TextLinkify/screenshots/main.pngbin0 -> 363177 bytes
-rw-r--r--views/TextLinkify/template-params.xml53
-rw-r--r--wearable/wear/AgendaData/Application/src/main/AndroidManifest.xml10
-rw-r--r--wearable/wear/AgendaData/Application/src/main/java/com/example/android/agendadata/CalendarQueryService.java267
-rw-r--r--wearable/wear/AgendaData/Application/src/main/java/com/example/android/agendadata/Constants.java39
-rw-r--r--wearable/wear/AgendaData/Application/src/main/java/com/example/android/agendadata/MainActivity.java202
-rw-r--r--wearable/wear/AgendaData/Application/src/main/java/com/example/android/wearable/agendadata/CalendarQueryService.java267
-rw-r--r--wearable/wear/AgendaData/Application/src/main/java/com/example/android/wearable/agendadata/Constants.java39
-rw-r--r--wearable/wear/AgendaData/Application/src/main/java/com/example/android/wearable/agendadata/MainActivity.java202
-rw-r--r--wearable/wear/AgendaData/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/AgendaData/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/AndroidManifest.xml8
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/agendadata/Constants.java35
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/agendadata/DeleteService.java118
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/agendadata/HomeListenerService.java180
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/wearable/agendadata/Constants.java35
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/wearable/agendadata/DeleteService.java118
-rw-r--r--wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/wearable/agendadata/HomeListenerService.java180
-rw-r--r--wearable/wear/AgendaData/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/AgendaData/screenshots/companion_agenda_data.pngbin0 -> 189298 bytes
-rw-r--r--wearable/wear/AgendaData/screenshots/dummy_calendar_event.pngbin0 -> 52952 bytes
-rw-r--r--wearable/wear/AgendaData/settings.gradle2
-rw-r--r--wearable/wear/AgendaData/template-params.xml43
-rw-r--r--wearable/wear/DataLayer/Application/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/DataLayer/Application/src/main/java/com/example/android/datalayer/MainActivity.java484
-rw-r--r--wearable/wear/DataLayer/Application/src/main/java/com/example/android/wearable/datalayer/MainActivity.java484
-rw-r--r--wearable/wear/DataLayer/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/DataLayer/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/DataLayer/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/DataLayer/Wearable/src/main/java/com/example/android/datalayer/DataLayerListenerService.java120
-rw-r--r--wearable/wear/DataLayer/Wearable/src/main/java/com/example/android/datalayer/MainActivity.java255
-rw-r--r--wearable/wear/DataLayer/Wearable/src/main/java/com/example/android/wearable/datalayer/DataLayerListenerService.java120
-rw-r--r--wearable/wear/DataLayer/Wearable/src/main/java/com/example/android/wearable/datalayer/MainActivity.java255
-rw-r--r--wearable/wear/DataLayer/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/DataLayer/screenshots/phone_image.pngbin0 -> 1549078 bytes
-rw-r--r--wearable/wear/DataLayer/screenshots/wearable_background_image.pngbin0 -> 150420 bytes
-rw-r--r--wearable/wear/DataLayer/settings.gradle2
-rw-r--r--wearable/wear/DataLayer/template-params.xml63
-rw-r--r--wearable/wear/DelayedConfirmation/Application/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/DelayedConfirmation/Application/src/main/java/com/example/android/delayedconfirmation/MainActivity.java134
-rw-r--r--wearable/wear/DelayedConfirmation/Application/src/main/java/com/example/android/wearable/delayedconfirmation/MainActivity.java134
-rw-r--r--wearable/wear/DelayedConfirmation/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/DelayedConfirmation/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/DelayedConfirmation/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/DelayedConfirmation/Wearable/src/main/java/com/example/android/delayedconfirmation/MainActivity.java143
-rw-r--r--wearable/wear/DelayedConfirmation/Wearable/src/main/java/com/example/android/delayedconfirmation/WearableMessageListenerService.java38
-rw-r--r--wearable/wear/DelayedConfirmation/Wearable/src/main/java/com/example/android/wearable/delayedconfirmation/MainActivity.java143
-rw-r--r--wearable/wear/DelayedConfirmation/Wearable/src/main/java/com/example/android/wearable/delayedconfirmation/WearableMessageListenerService.java38
-rw-r--r--wearable/wear/DelayedConfirmation/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/DelayedConfirmation/screenshots/companion_delayed_confirmation.pngbin0 -> 111638 bytes
-rw-r--r--wearable/wear/DelayedConfirmation/screenshots/delayed_confirmation_box_inset_all.pngbin0 -> 21123 bytes
-rw-r--r--wearable/wear/DelayedConfirmation/screenshots/delayed_confirmation_box_inset_top.pngbin0 -> 21178 bytes
-rw-r--r--wearable/wear/DelayedConfirmation/screenshots/delayed_confirmation_notification.pngbin0 -> 123940 bytes
-rw-r--r--wearable/wear/DelayedConfirmation/settings.gradle2
-rw-r--r--wearable/wear/DelayedConfirmation/template-params.xml6
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/AndroidManifest.xml10
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/java/com/example/android/elizachat/ElizaResponder.java168
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/java/com/example/android/elizachat/MainActivity.java107
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/java/com/example/android/elizachat/ResponderService.java148
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/ElizaResponder.java168
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/MainActivity.java107
-rw-r--r--wearable/wear/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/ResponderService.java148
-rw-r--r--wearable/wear/ElizaChat/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/ElizaChat/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/ElizaChat/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/ElizaChat/screenshots/companion_eliza_chat.pngbin0 -> 68875 bytes
-rw-r--r--wearable/wear/ElizaChat/screenshots/companion_eliza_chat_response.pngbin0 -> 96693 bytes
-rw-r--r--wearable/wear/ElizaChat/screenshots/wearable_eliza_notification.pngbin0 -> 43519 bytes
-rw-r--r--wearable/wear/ElizaChat/screenshots/wearable_voice_reply.pngbin0 -> 8902 bytes
-rw-r--r--wearable/wear/ElizaChat/template-params.xml91
-rw-r--r--wearable/wear/EmbeddedApp/Application/src/main/AndroidManifest.xml2
-rw-r--r--wearable/wear/EmbeddedApp/Application/src/main/java/com/example/android/embeddedapp/PhoneActivity.java29
-rw-r--r--wearable/wear/EmbeddedApp/Application/src/main/java/com/example/android/wearable/embeddedapp/PhoneActivity.java29
-rw-r--r--wearable/wear/EmbeddedApp/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/EmbeddedApp/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/EmbeddedApp/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/EmbeddedApp/Wearable/src/main/java/com/example/android/embeddedapp/WearableActivity.java29
-rw-r--r--wearable/wear/EmbeddedApp/Wearable/src/main/java/com/example/android/wearable/embeddedapp/WearableActivity.java29
-rw-r--r--wearable/wear/EmbeddedApp/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/EmbeddedApp/screenshots/embedded_wearable_app.pngbin0 -> 21543 bytes
-rw-r--r--wearable/wear/EmbeddedApp/screenshots/phone_app.pngbin0 -> 164943 bytes
-rw-r--r--wearable/wear/EmbeddedApp/settings.gradle2
-rw-r--r--wearable/wear/EmbeddedApp/template-params.xml56
-rw-r--r--wearable/wear/FindMyPhone/Application/src/main/AndroidManifest.xml8
-rw-r--r--wearable/wear/FindMyPhone/Application/src/main/java/com/example/android/findphone/SoundAlarmListenerService.java101
-rw-r--r--wearable/wear/FindMyPhone/Application/src/main/java/com/example/android/wearable/findphone/SoundAlarmListenerService.java101
-rw-r--r--wearable/wear/FindMyPhone/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/FindMyPhone/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/findphone/DisconnectListenerService.java55
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/findphone/FindPhoneActivity.java87
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/findphone/FindPhoneService.java121
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/wearable/findphone/DisconnectListenerService.java55
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/wearable/findphone/FindPhoneActivity.java87
-rw-r--r--wearable/wear/FindMyPhone/Wearable/src/main/java/com/example/android/wearable/findphone/FindPhoneService.java121
-rw-r--r--wearable/wear/FindMyPhone/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/FindMyPhone/screenshots/find_my_phone_activity.pngbin0 -> 143295 bytes
-rw-r--r--wearable/wear/FindMyPhone/screenshots/find_my_phone_notification.pngbin0 -> 14452 bytes
-rw-r--r--wearable/wear/FindMyPhone/settings.gradle2
-rw-r--r--wearable/wear/FindMyPhone/template-params.xml6
-rw-r--r--wearable/wear/Flashlight/Application/src/main/AndroidManifest.xml7
-rwxr-xr-xwearable/wear/Flashlight/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/Flashlight/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/Flashlight/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xwearable/wear/Flashlight/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/Flashlight/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/Flashlight/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/Flashlight/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/Flashlight/Wearable/src/main/java/com/example/android/flashlight/MainActivity.java125
-rw-r--r--wearable/wear/Flashlight/Wearable/src/main/java/com/example/android/flashlight/PartyLightView.java120
-rw-r--r--wearable/wear/Flashlight/Wearable/src/main/java/com/example/android/wearable/flashlight/MainActivity.java125
-rw-r--r--wearable/wear/Flashlight/Wearable/src/main/java/com/example/android/wearable/flashlight/PartyLightView.java120
-rw-r--r--wearable/wear/Flashlight/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/Flashlight/screenshots/flashlight.pngbin0 -> 5402 bytes
-rw-r--r--wearable/wear/Flashlight/screenshots/party_mode.gifbin0 -> 7329 bytes
-rw-r--r--wearable/wear/Flashlight/settings.gradle2
-rw-r--r--wearable/wear/Flashlight/template-params.xml5
-rw-r--r--wearable/wear/Geofencing/Application/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/geofencing/Constants.java77
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/geofencing/GeofenceTransitionsIntentService.java119
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/geofencing/MainActivity.java240
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/geofencing/SimpleGeofence.java87
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/geofencing/SimpleGeofenceStore.java124
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/Constants.java77
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/GeofenceTransitionsIntentService.java122
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/MainActivity.java198
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/SimpleGeofence.java87
-rw-r--r--wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/SimpleGeofenceStore.java124
-rw-r--r--wearable/wear/Geofencing/Application/src/main/res/values/strings.xml2
-rw-r--r--wearable/wear/Geofencing/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/Geofencing/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/geofencing/CheckInAndDeleteDataItemsService.java124
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/geofencing/Constants.java38
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/geofencing/HomeListenerService.java152
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/wearable/geofencing/CheckInAndDeleteDataItemsService.java124
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/wearable/geofencing/Constants.java38
-rw-r--r--wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/wearable/geofencing/HomeListenerService.java152
-rw-r--r--wearable/wear/Geofencing/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/Geofencing/screenshots/android_building_check_in.pngbin0 -> 107191 bytes
-rw-r--r--wearable/wear/Geofencing/screenshots/icon-web.pngbin0 -> 1703 bytes
-rw-r--r--wearable/wear/Geofencing/settings.gradle2
-rw-r--r--wearable/wear/Geofencing/template-params.xml57
-rw-r--r--wearable/wear/GridViewPager/Application/src/main/AndroidManifest.xml7
-rwxr-xr-xwearable/wear/GridViewPager/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/GridViewPager/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/GridViewPager/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xwearable/wear/GridViewPager/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/GridViewPager/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/GridViewPager/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/java/com/example/android/gridviewpager/MainActivity.java56
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/java/com/example/android/gridviewpager/SampleGridPagerAdapter.java134
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/java/com/example/android/wearable/gridviewpager/CustomFragment.java32
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/java/com/example/android/wearable/gridviewpager/MainActivity.java59
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/java/com/example/android/wearable/gridviewpager/SampleGridPagerAdapter.java198
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/drawable-nodpi/bugdroid_large.pngbin0 -> 10089 bytes
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/drawable/gradient.xml27
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/drawable/shape.xml34
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/layout/activity_main.xml23
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/layout/custom_fragment.xml31
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/values/dimens.xml1
-rw-r--r--wearable/wear/GridViewPager/Wearable/src/main/res/values/strings.xml30
-rw-r--r--wearable/wear/GridViewPager/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/GridViewPager/screenshots/grid_view_pager.gifbin0 -> 518920 bytes
-rw-r--r--wearable/wear/GridViewPager/settings.gradle2
-rw-r--r--wearable/wear/GridViewPager/template-params.xml6
-rw-r--r--wearable/wear/JumpingJack/Application/src/main/AndroidManifest.xml8
-rwxr-xr-xwearable/wear/JumpingJack/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/JumpingJack/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/JumpingJack/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rw-r--r--wearable/wear/JumpingJack/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/JumpingJack/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/JumpingJack/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/jumpingjack/MainActivity.java257
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/jumpingjack/PagerAdapter.java52
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/jumpingjack/Utils.java67
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/jumpingjack/fragments/CounterFragment.java94
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/jumpingjack/fragments/SettingsFragment.java55
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/MainActivity.java257
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/PagerAdapter.java52
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/Utils.java67
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/fragments/CounterFragment.java94
-rw-r--r--wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/fragments/SettingsFragment.java48
-rw-r--r--wearable/wear/JumpingJack/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/JumpingJack/screenshots/jumping_jack.gifbin0 -> 5199 bytes
-rw-r--r--wearable/wear/JumpingJack/screenshots/web-icon.pngbin0 -> 15228 bytes
-rw-r--r--wearable/wear/JumpingJack/settings.gradle2
-rw-r--r--wearable/wear/JumpingJack/template-params.xml64
-rw-r--r--wearable/wear/Notifications/Application/src/main/AndroidManifest.xml13
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/ActionsPreset.java33
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/ActionsPresets.java158
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/BackgroundPickers.java140
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/MainActivity.java352
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/NamedPreset.java28
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/NotificationIntentReceiver.java60
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/NotificationPreset.java74
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/NotificationPresets.java479
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/NotificationUtil.java36
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/PriorityPreset.java32
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/notifications/PriorityPresets.java55
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/ActionsPreset.java33
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/ActionsPresets.java158
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/BackgroundPickers.java140
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/MainActivity.java352
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/NamedPreset.java28
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/NotificationIntentReceiver.java60
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/NotificationPreset.java74
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/NotificationPresets.java510
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/NotificationUtil.java36
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/PriorityPreset.java32
-rw-r--r--wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/PriorityPresets.java55
-rw-r--r--wearable/wear/Notifications/Application/src/main/res/drawable-nodpi/qr_code.pngbin0 -> 12394 bytes
-rw-r--r--wearable/wear/Notifications/Application/src/main/res/values/colors.xml2
-rw-r--r--wearable/wear/Notifications/Application/src/main/res/values/strings.xml4
-rw-r--r--wearable/wear/Notifications/Shared/.gitignore16
-rw-r--r--wearable/wear/Notifications/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/Notifications/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/notifications/AnimatedNotificationDisplayActivity.java138
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/notifications/BasicNotificationDisplayActivity.java38
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/notifications/MainActivity.java106
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/notifications/NotificationPreset.java34
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/notifications/NotificationPresets.java314
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/notifications/WearableListItemLayout.java91
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/support/wearable/notifications/AnimatedNotificationDisplayActivity.java138
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/support/wearable/notifications/BasicNotificationDisplayActivity.java38
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/support/wearable/notifications/MainActivity.java106
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/support/wearable/notifications/NotificationPreset.java34
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/support/wearable/notifications/NotificationPresets.java314
-rw-r--r--wearable/wear/Notifications/Wearable/src/main/java/com/example/android/support/wearable/notifications/WearableListItemLayout.java70
-rw-r--r--wearable/wear/Notifications/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/Notifications/screenshots/basic-menu.pngbin0 -> 8209 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/basic.pngbin0 -> 11548 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/bottom-aligned.pngbin0 -> 21453 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/bundle.pngbin0 -> 14524 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/companion-bottom-aligned.pngbin0 -> 251749 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/companion-bundle.pngbin0 -> 242834 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/companion-content-action.pngbin0 -> 246241 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/companion-multiple-page.pngbin0 -> 457655 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-action.pngbin0 -> 8621 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-action2.pngbin0 -> 9653 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-icon-menu.pngbin0 -> 9182 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-icon1.pngbin0 -> 10393 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-icon2.pngbin0 -> 10383 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-icon3.pngbin0 -> 10841 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/content-icon4.pngbin0 -> 10788 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/display-intent-menu.pngbin0 -> 13160 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/display-intent.pngbin0 -> 10924 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/ic_launcher.pngbin0 -> 6722 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/multiple-page1.pngbin0 -> 119352 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/multiple-page2.pngbin0 -> 75010 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/stylized-menu.pngbin0 -> 11678 bytes
-rw-r--r--wearable/wear/Notifications/screenshots/stylized.pngbin0 -> 24649 bytes
-rw-r--r--wearable/wear/Notifications/settings.gradle2
-rw-r--r--wearable/wear/Notifications/template-params.xml45
-rw-r--r--wearable/wear/Quiz/Application/src/main/AndroidManifest.xml8
-rw-r--r--wearable/wear/Quiz/Application/src/main/java/com/example/android/quiz/Constants.java39
-rw-r--r--wearable/wear/Quiz/Application/src/main/java/com/example/android/quiz/JsonUtils.java47
-rw-r--r--wearable/wear/Quiz/Application/src/main/java/com/example/android/quiz/MainActivity.java585
-rw-r--r--wearable/wear/Quiz/Application/src/main/java/com/example/android/wearable/quiz/Constants.java39
-rw-r--r--wearable/wear/Quiz/Application/src/main/java/com/example/android/wearable/quiz/JsonUtils.java47
-rw-r--r--wearable/wear/Quiz/Application/src/main/java/com/example/android/wearable/quiz/MainActivity.java585
-rw-r--r--wearable/wear/Quiz/Shared/.gitignore16
-rw-r--r--wearable/wear/Quiz/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/Quiz/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/quiz/Constants.java41
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/quiz/DeleteQuestionService.java94
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/quiz/QuizListenerService.java219
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/quiz/QuizReportActionService.java67
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/quiz/UpdateQuestionService.java108
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/Constants.java41
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/DeleteQuestionService.java94
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/QuizListenerService.java219
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/QuizReportActionService.java67
-rw-r--r--wearable/wear/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/UpdateQuestionService.java108
-rw-r--r--wearable/wear/Quiz/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/Quiz/screenshots/companion_quiz.pngbin0 -> 184257 bytes
-rw-r--r--wearable/wear/Quiz/screenshots/companion_quiz_correct_status.pngbin0 -> 191361 bytes
-rw-r--r--wearable/wear/Quiz/screenshots/wearable_quiz.pngbin0 -> 16060 bytes
-rw-r--r--wearable/wear/Quiz/screenshots/wearable_quiz_answer.pngbin0 -> 12854 bytes
-rw-r--r--wearable/wear/Quiz/screenshots/wearable_quiz_report.pngbin0 -> 17850 bytes
-rw-r--r--wearable/wear/Quiz/settings.gradle2
-rw-r--r--wearable/wear/Quiz/template-params.xml6
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/AssetUtils.java79
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/Constants.java43
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/MainActivity.java50
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/Recipe.java126
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/RecipeActivity.java138
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/RecipeListAdapter.java173
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/recipeassistant/RecipeService.java96
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/AssetUtils.java79
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/Constants.java43
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/MainActivity.java50
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/Recipe.java126
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/RecipeActivity.java138
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/RecipeListAdapter.java173
-rw-r--r--wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/RecipeService.java96
-rw-r--r--wearable/wear/RecipeAssistant/Shared/.gitignore16
-rw-r--r--wearable/wear/RecipeAssistant/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/RecipeAssistant/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/RecipeAssistant/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/RecipeAssistant/screenshots/guac_notification.pngbin0 -> 50992 bytes
-rw-r--r--wearable/wear/RecipeAssistant/screenshots/guac_notification_step1.pngbin0 -> 57419 bytes
-rw-r--r--wearable/wear/RecipeAssistant/screenshots/recipe_assistant_guac.pngbin0 -> 1166581 bytes
-rw-r--r--wearable/wear/RecipeAssistant/template-params.xml4
-rw-r--r--wearable/wear/SkeletonWearableApp/Application/src/main/AndroidManifest.xml7
-rwxr-xr-xwearable/wear/SkeletonWearableApp/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/SkeletonWearableApp/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/SkeletonWearableApp/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xwearable/wear/SkeletonWearableApp/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/SkeletonWearableApp/Shared/.gitignore16
-rw-r--r--wearable/wear/SkeletonWearableApp/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/SkeletonWearableApp/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/SkeletonWearableApp/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/GridExampleActivity.java115
-rw-r--r--wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/MainActivity.java129
-rw-r--r--wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/skeletonwearableapp/GridExampleActivity.java108
-rw-r--r--wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/skeletonwearableapp/MainActivity.java129
-rw-r--r--wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/SkeletonWearableApp/screenshots/delayed_confirmation.pngbin0 -> 17065 bytes
-rw-r--r--wearable/wear/SkeletonWearableApp/screenshots/dismiss_overlay.pngbin0 -> 16019 bytes
-rw-r--r--wearable/wear/SkeletonWearableApp/screenshots/grid_view_pager.pngbin0 -> 6093 bytes
-rw-r--r--wearable/wear/SkeletonWearableApp/screenshots/skeleton_wearable_app.pngbin0 -> 17882 bytes
-rw-r--r--wearable/wear/SkeletonWearableApp/settings.gradle2
-rw-r--r--wearable/wear/SkeletonWearableApp/template-params.xml52
-rw-r--r--wearable/wear/SpeedTracker/Application/.gitignore (renamed from wearable/wear/Geofencing/Shared/.gitignore)0
-rw-r--r--wearable/wear/SpeedTracker/Application/src/main/AndroidManifest.xml5
-rw-r--r--wearable/wear/SpeedTracker/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin1399 -> 4311 bytes
-rw-r--r--wearable/wear/SpeedTracker/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin1102 -> 2600 bytes
-rw-r--r--wearable/wear/SpeedTracker/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin1987 -> 5894 bytes
-rw-r--r--wearable/wear/SpeedTracker/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin3446 -> 9540 bytes
-rw-r--r--wearable/wear/SpeedTracker/Application/src/main/res/drawable-xxxhdpi/ic_launcher.pngbin5166 -> 13382 bytes
-rw-r--r--wearable/wear/SpeedTracker/Shared/.gitignore (renamed from wearable/wear/GridViewPager/Shared/.gitignore)0
-rw-r--r--wearable/wear/SpeedTracker/Wearable/.gitignore (renamed from wearable/wear/JumpingJack/Shared/.gitignore)0
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/AndroidManifest.xml2
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/WearableMainActivity.java4
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/ui/SpeedPickerLayout.java35
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-hdpi/ic_launcher.pngbin1399 -> 4311 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-mdpi/ic_launcher.pngbin1102 -> 2600 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xhdpi/ic_launcher.pngbin1987 -> 5894 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_file_download_black_24dp.pngbin355 -> 0 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_file_download_googblue_24dp.pngbin309 -> 0 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_file_download_grey600_24dp.pngbin434 -> 0 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_file_download_white_24dp.pngbin433 -> 0 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_gps_not_saving_grey600_96dp.pngbin0 -> 6470 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_gps_saving_grey600_96dp.pngbin0 -> 5667 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.pngbin3446 -> 9540 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/drawable-xxxhdpi/ic_launcher.pngbin5166 -> 13382 bytes
-rw-r--r--wearable/wear/SpeedTracker/Wearable/src/main/res/layout/main_activity.xml4
-rw-r--r--wearable/wear/SpeedTracker/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/SpeedTracker/template-params.xml25
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/src/main/AndroidManifest.xml8
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/src/main/java/com/example/android/synchronizednotifications/DismissListener.java128
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/src/main/java/com/example/android/synchronizednotifications/SynchronizedNotificationsFragment.java198
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/src/main/java/com/example/android/wearable/synchronizednotifications/DismissListener.java128
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/src/main/java/com/example/android/wearable/synchronizednotifications/SynchronizedNotificationsFragment.java198
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/tests/AndroidManifest.xml40
-rw-r--r--wearable/wear/SynchronizedNotifications/Application/tests/src/com/example/android/synchronizednotifications/tests/SampleTests.java57
-rw-r--r--wearable/wear/SynchronizedNotifications/CONTRIB.md35
-rw-r--r--wearable/wear/SynchronizedNotifications/LICENSE201
-rw-r--r--wearable/wear/SynchronizedNotifications/Shared/build.gradle38
-rw-r--r--wearable/wear/SynchronizedNotifications/Shared/src/main/AndroidManifest.xml2
-rw-r--r--wearable/wear/SynchronizedNotifications/Shared/src/main/java/com/example/android/synchronizednotifications/common/Constants.java37
-rw-r--r--wearable/wear/SynchronizedNotifications/Shared/src/main/java/com/example/android/wearable/synchronizednotifications/common/Constants.java37
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/build.gradle74
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/src/main/java/com/example/android/synchronizednotifications/NotificationUpdateService.java164
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/src/main/java/com/example/android/synchronizednotifications/WearableActivity.java28
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/src/main/java/com/example/android/wearable/synchronizednotifications/NotificationUpdateService.java164
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/src/main/java/com/example/android/wearable/synchronizednotifications/WearableActivity.java28
-rw-r--r--wearable/wear/SynchronizedNotifications/Wearable/src/main/res/values/strings.xml2
-rw-r--r--wearable/wear/SynchronizedNotifications/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/SynchronizedNotifications/screenshots/different_notifications_phone.pngbin0 -> 135301 bytes
-rw-r--r--wearable/wear/SynchronizedNotifications/screenshots/different_notifications_wearable.pngbin0 -> 15816 bytes
-rw-r--r--wearable/wear/SynchronizedNotifications/screenshots/notification_options.pngbin0 -> 102231 bytes
-rw-r--r--wearable/wear/SynchronizedNotifications/screenshots/watch_only_notification.pngbin0 -> 18346 bytes
-rwxr-xr-xwearable/wear/SynchronizedNotifications/screenshots/web-icon.pngbin0 -> 74754 bytes
-rw-r--r--wearable/wear/SynchronizedNotifications/settings.gradle3
-rw-r--r--wearable/wear/SynchronizedNotifications/template-params.xml77
-rw-r--r--wearable/wear/Timer/Application/src/main/AndroidManifest.xml7
-rwxr-xr-xwearable/wear/Timer/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/Timer/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/Timer/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xwearable/wear/Timer/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/Timer/Shared/.gitignore16
-rw-r--r--wearable/wear/Timer/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/Timer/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/Timer/Wearable/src/main/AndroidManifest.xml4
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/timer/SetTimerActivity.java217
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/timer/TimerNotificationService.java119
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/timer/WearableListItemLayout.java90
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/timer/util/Constants.java43
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/timer/util/TimerFormat.java121
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/timer/util/TimerObj.java49
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/SetTimerActivity.java217
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/TimerNotificationService.java119
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/WearableListItemLayout.java68
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/util/Constants.java43
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/util/TimerFormat.java121
-rw-r--r--wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/util/TimerObj.java49
-rw-r--r--wearable/wear/Timer/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/Timer/screenshots/timer.pngbin0 -> 7849 bytes
-rw-r--r--wearable/wear/Timer/screenshots/timer_countdown.pngbin0 -> 116502 bytes
-rw-r--r--wearable/wear/Timer/settings.gradle2
-rw-r--r--wearable/wear/Timer/template-params.xml6
-rw-r--r--wearable/wear/WatchFace/Application/.gitignore16
-rw-r--r--wearable/wear/WatchFace/Application/proguard-project.txt20
-rw-r--r--wearable/wear/WatchFace/Application/src/main/AndroidManifest.xml74
-rw-r--r--wearable/wear/WatchFace/Application/src/main/java/com/example/android/wearable/watchface/AnalogAndCardBoundsWatchFaceConfigActivity.java37
-rw-r--r--wearable/wear/WatchFace/Application/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceCompanionConfigActivity.java217
-rw-r--r--wearable/wear/WatchFace/Application/src/main/java/com/example/android/wearable/watchface/TiltWatchFaceConfigActivity.java37
-rwxr-xr-xwearable/wear/WatchFace/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/WatchFace/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/WatchFace/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xwearable/wear/WatchFace/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/WatchFace/Application/src/main/res/layout/activity_analog_watch_face_config.xml27
-rw-r--r--wearable/wear/WatchFace/Application/src/main/res/layout/activity_digital_watch_face_config.xml95
-rw-r--r--wearable/wear/WatchFace/Application/src/main/res/layout/activity_tilt_watch_face_config.xml27
-rw-r--r--wearable/wear/WatchFace/Application/src/main/res/values/strings.xml45
-rw-r--r--wearable/wear/WatchFace/CONTRIB.md35
-rw-r--r--wearable/wear/WatchFace/LICENSE201
-rw-r--r--wearable/wear/WatchFace/Wearable/.gitignore16
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/AndroidManifest.xml193
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/AnalogWatchFaceService.java334
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/CalendarWatchFaceService.java232
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/CardBoundsWatchFaceService.java103
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceConfigListenerService.java91
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceService.java605
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceUtil.java205
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceWearableConfigActivity.java298
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/Gles2ColoredTriangleList.java278
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/SweepWatchFaceService.java275
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/TiltWatchFaceService.java478
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/bg.pngbin0 -> 61104 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_analog.pngbin0 -> 35216 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_analog_circular.pngbin0 -> 89304 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_calendar.pngbin0 -> 1793 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_calendar_circular.pngbin0 -> 4572 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_card_bounds.pngbin0 -> 9853 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_card_bounds_circular.pngbin0 -> 24280 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_digital.pngbin0 -> 50993 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_digital_circular.pngbin0 -> 8256 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_tilt.pngbin0 -> 5703 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_tilt_circular.pngbin0 -> 9987 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_digital_config.xml39
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/layout/color_picker_item.xml38
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/values/color.xml23
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/values/dimens.xml26
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml51
-rw-r--r--wearable/wear/WatchFace/Wearable/src/main/res/xml/watch_face.xml16
-rw-r--r--wearable/wear/WatchFace/build.gradle (renamed from ui/notifications/LNotifications/build.gradle)0
-rw-r--r--wearable/wear/WatchFace/buildSrc/build.gradle (renamed from ui/notifications/BasicNotifications/buildSrc/build.gradle)0
-rw-r--r--wearable/wear/WatchFace/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--wearable/wear/WatchFace/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xwearable/wear/WatchFace/gradlew164
-rw-r--r--wearable/wear/WatchFace/gradlew.bat90
-rw-r--r--wearable/wear/WatchFace/screenshots/analog_and_sweep_face.pngbin0 -> 80646 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/calendar_face.pngbin0 -> 3171 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/card_bounds_face.pngbin0 -> 24589 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/card_bounds_face2.pngbin0 -> 18637 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/digital_face.pngbin0 -> 7646 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/digital_phoneside_config.pngbin0 -> 135288 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/digital_watchside_config.pngbin0 -> 9419 bytes
-rw-r--r--wearable/wear/WatchFace/screenshots/tilt_face.pngbin0 -> 2807 bytes
-rw-r--r--wearable/wear/WatchFace/settings.gradle1
-rw-r--r--wearable/wear/WatchFace/template-params.xml47
-rw-r--r--wearable/wear/WatchViewStub/Application/src/main/AndroidManifest.xml7
-rwxr-xr-xwearable/wear/WatchViewStub/Application/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xwearable/wear/WatchViewStub/Application/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xwearable/wear/WatchViewStub/Application/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xwearable/wear/WatchViewStub/Application/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--wearable/wear/WatchViewStub/Shared/.gitignore16
-rw-r--r--wearable/wear/WatchViewStub/Shared/src/main/AndroidManifest.xml25
-rw-r--r--wearable/wear/WatchViewStub/Shared/src/main/res/values/strings.xml18
-rw-r--r--wearable/wear/WatchViewStub/Wearable/src/main/AndroidManifest.xml6
-rw-r--r--wearable/wear/WatchViewStub/Wearable/src/main/java/com/example/android/google/wearable/watchviewstub/MainActivity.java85
-rw-r--r--wearable/wear/WatchViewStub/Wearable/src/main/java/com/example/android/watchviewstub/MainActivity.java85
-rw-r--r--wearable/wear/WatchViewStub/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--wearable/wear/WatchViewStub/screenshots/watch_view_stub_rectangular.pngbin0 -> 29819 bytes
-rw-r--r--wearable/wear/WatchViewStub/screenshots/watch_view_stub_round.pngbin0 -> 28097 bytes
-rw-r--r--wearable/wear/WatchViewStub/settings.gradle2
-rw-r--r--wearable/wear/WatchViewStub/template-params.xml45
1298 files changed, 32518 insertions, 12777 deletions
diff --git a/.gitignore b/.gitignore
index a762655..dd5dda7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,18 +9,22 @@
*.class
# generated files
+.google/
bin/
out/
src/common
src/template
_index.jd
-README.txt
+CONTRIBUTING.md
+LICENSE
+NOTICE
+README.md
+README-wear.txt
# Libraries used by the app
# Can explicitly add if we want, but shouldn't do so blindly. Licenses, bloat, etc.
/libs
-
# Build stuff (auto-generated by android update project ...)
ant.properties
local.properties
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/AppRestrictionEnforcerFragment.java b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/AppRestrictionEnforcerFragment.java
index 6db54f6..8b0620f 100644
--- a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/AppRestrictionEnforcerFragment.java
+++ b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/AppRestrictionEnforcerFragment.java
@@ -22,34 +22,34 @@ import android.content.Context;
import android.content.RestrictionEntry;
import android.content.RestrictionsManager;
import android.content.SharedPreferences;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.Button;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
import android.widget.CompoundButton;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.Spinner;
import android.widget.Switch;
-import android.widget.TextView;
import android.widget.Toast;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/**
* This fragment provides UI and functionality to set restrictions on the AppRestrictionSchema
* sample.
*/
-public class AppRestrictionEnforcerFragment extends Fragment implements View.OnClickListener,
- CompoundButton.OnCheckedChangeListener {
-
- /**
- * Package name of the AppRestrictionSchema sample.
- */
- private static final String PACKAGE_NAME_APP_RESTRICTION_SCHEMA
- = "com.example.android.apprestrictionschema";
+public class AppRestrictionEnforcerFragment extends Fragment implements
+ CompoundButton.OnCheckedChangeListener, AdapterView.OnItemSelectedListener {
/**
* Key for {@link SharedPreferences}
@@ -62,15 +62,38 @@ public class AppRestrictionEnforcerFragment extends Fragment implements View.OnC
private static final String RESTRICTION_KEY_SAY_HELLO = "can_say_hello";
/**
- * Default boolean value for "can_say_hello" restriction. The actual value is loaded in
- * {@link #loadRestrictions(android.app.Activity)}.
+ * Key for the string restriction in AppRestrictionSchema.
+ */
+ private static final String RESTRICTION_KEY_MESSAGE = "message";
+
+ /**
+ * Key for the integer restriction in AppRestrictionSchema.
+ */
+ private static final String RESTRICTION_KEY_NUMBER = "number";
+
+ /**
+ * Key for the choice restriction in AppRestrictionSchema.
+ */
+ private static final String RESTRICTION_KEY_RANK = "rank";
+
+ /**
+ * Key for the multi-select restriction in AppRestrictionSchema.
*/
- private boolean mDefaultValueRestrictionSayHello;
+ private static final String RESTRICTION_KEY_APPROVALS = "approvals";
+
+ private static final String DELIMETER = ",";
+
+ /**
+ * Current status of the restrictions.
+ */
+ private Bundle mCurrentRestrictions = new Bundle();
// UI Components
- private TextView mTextStatus;
- private Button mButtonUnhide;
private Switch mSwitchSayHello;
+ private EditText mEditMessage;
+ private EditText mEditNumber;
+ private Spinner mSpinnerRank;
+ private LinearLayout mLayoutApprovals;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@@ -80,152 +103,262 @@ public class AppRestrictionEnforcerFragment extends Fragment implements View.OnC
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
- mTextStatus = (TextView) view.findViewById(R.id.status);
- mButtonUnhide = (Button) view.findViewById(R.id.unhide);
+ // Retain references for the UI elements
mSwitchSayHello = (Switch) view.findViewById(R.id.say_hello);
- mButtonUnhide.setOnClickListener(this);
- mSwitchSayHello.setOnCheckedChangeListener(this);
+ mEditMessage = (EditText) view.findViewById(R.id.message);
+ mEditNumber = (EditText) view.findViewById(R.id.number);
+ mSpinnerRank = (Spinner) view.findViewById(R.id.rank);
+ mLayoutApprovals = (LinearLayout) view.findViewById(R.id.approvals);
}
@Override
public void onResume() {
super.onResume();
- updateUi(getActivity());
+ loadRestrictions(getActivity());
}
@Override
- public void onClick(View view) {
- switch (view.getId()) {
- case R.id.unhide: {
- unhideApp(getActivity());
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ switch (compoundButton.getId()) {
+ case R.id.say_hello: {
+ saveCanSayHello(getActivity(), checked);
+ break;
+ }
+ case R.id.approval: {
+ if (checked) {
+ addApproval(getActivity(), (String) compoundButton.getTag());
+ } else {
+ removeApproval(getActivity(), (String) compoundButton.getTag());
+ }
break;
}
}
}
+ private TextWatcher mWatcherMessage = new EasyTextWatcher() {
+ @Override
+ public void afterTextChanged(Editable s) {
+ saveMessage(getActivity(), s.toString());
+ }
+ };
+
+ private TextWatcher mWatcherNumber = new EasyTextWatcher() {
+ @Override
+ public void afterTextChanged(Editable s) {
+ try {
+ String string = s.toString();
+ if (!TextUtils.isEmpty(string)) {
+ saveNumber(getActivity(), Integer.parseInt(string));
+ }
+ } catch (NumberFormatException e) {
+ Toast.makeText(getActivity(), "Not an integer!", Toast.LENGTH_SHORT).show();
+ }
+ }
+ };
+
@Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- switch (compoundButton.getId()) {
- case R.id.say_hello: {
- allowSayHello(getActivity(), checked);
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+ switch (parent.getId()) {
+ case R.id.rank: {
+ saveRank(getActivity(), (String) parent.getAdapter().getItem(position));
break;
}
}
}
+ @Override
+ public void onNothingSelected(AdapterView<?> parent) {
+ // Nothing to do
+ }
+
/**
- * Updates the UI components according to the current status of AppRestrictionSchema and its
- * restriction.
+ * Loads the restrictions for the AppRestrictionSchema sample. In this implementation, we just
+ * read the default value for the "can_say_hello" restriction.
*
* @param activity The activity
*/
- private void updateUi(Activity activity) {
- PackageManager packageManager = activity.getPackageManager();
- try {
- ApplicationInfo info = packageManager.getApplicationInfo(
- PACKAGE_NAME_APP_RESTRICTION_SCHEMA, PackageManager.GET_UNINSTALLED_PACKAGES);
- DevicePolicyManager devicePolicyManager =
- (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE);
- if (0 < (info.flags & ApplicationInfo.FLAG_INSTALLED)) {
- if (!devicePolicyManager.isApplicationHidden(
- EnforcerDeviceAdminReceiver.getComponentName(activity),
- PACKAGE_NAME_APP_RESTRICTION_SCHEMA)) {
- // The app is ready
- loadRestrictions(activity);
- mTextStatus.setVisibility(View.GONE);
- mButtonUnhide.setVisibility(View.GONE);
- mSwitchSayHello.setVisibility(View.VISIBLE);
- mSwitchSayHello.setOnCheckedChangeListener(null);
- mSwitchSayHello.setChecked(canSayHello(activity));
- mSwitchSayHello.setOnCheckedChangeListener(this);
- } else {
- // The app is installed but hidden in this profile
- mTextStatus.setText(R.string.status_not_activated);
- mTextStatus.setVisibility(View.VISIBLE);
- mButtonUnhide.setVisibility(View.VISIBLE);
- mSwitchSayHello.setVisibility(View.GONE);
- }
- } else {
- // Need to reinstall the sample app
- mTextStatus.setText(R.string.status_need_reinstall);
- mTextStatus.setVisibility(View.VISIBLE);
- mButtonUnhide.setVisibility(View.GONE);
- mSwitchSayHello.setVisibility(View.GONE);
+ private void loadRestrictions(Activity activity) {
+ RestrictionsManager manager =
+ (RestrictionsManager) activity.getSystemService(Context.RESTRICTIONS_SERVICE);
+ List<RestrictionEntry> restrictions =
+ manager.getManifestRestrictions(Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA);
+ SharedPreferences prefs = activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE);
+ for (RestrictionEntry restriction : restrictions) {
+ String key = restriction.getKey();
+ if (RESTRICTION_KEY_SAY_HELLO.equals(key)) {
+ updateCanSayHello(prefs.getBoolean(RESTRICTION_KEY_SAY_HELLO,
+ restriction.getSelectedState()));
+ } else if (RESTRICTION_KEY_MESSAGE.equals(key)) {
+ updateMessage(prefs.getString(RESTRICTION_KEY_MESSAGE,
+ restriction.getSelectedString()));
+ } else if (RESTRICTION_KEY_NUMBER.equals(key)) {
+ updateNumber(prefs.getInt(RESTRICTION_KEY_NUMBER,
+ restriction.getIntValue()));
+ } else if (RESTRICTION_KEY_RANK.equals(key)) {
+ updateRank(activity, restriction.getChoiceValues(),
+ prefs.getString(RESTRICTION_KEY_RANK, restriction.getSelectedString()));
+ } else if (RESTRICTION_KEY_APPROVALS.equals(key)) {
+ updateApprovals(activity, restriction.getChoiceValues(),
+ TextUtils.split(prefs.getString(RESTRICTION_KEY_APPROVALS,
+ TextUtils.join(DELIMETER,
+ restriction.getAllSelectedStrings())),
+ DELIMETER));
}
- } catch (PackageManager.NameNotFoundException e) {
- mTextStatus.setText(R.string.status_not_installed);
- mTextStatus.setVisibility(View.VISIBLE);
- mButtonUnhide.setVisibility(View.GONE);
- mSwitchSayHello.setVisibility(View.GONE);
+ }
+ }
+
+ private void updateCanSayHello(boolean canSayHello) {
+ mCurrentRestrictions.putBoolean(RESTRICTION_KEY_SAY_HELLO, canSayHello);
+ mSwitchSayHello.setOnCheckedChangeListener(null);
+ mSwitchSayHello.setChecked(canSayHello);
+ mSwitchSayHello.setOnCheckedChangeListener(this);
+ }
+
+ private void updateMessage(String message) {
+ mCurrentRestrictions.putString(RESTRICTION_KEY_MESSAGE, message);
+ mEditMessage.removeTextChangedListener(mWatcherMessage);
+ mEditMessage.setText(message);
+ mEditMessage.addTextChangedListener(mWatcherMessage);
+ }
+
+ private void updateNumber(int number) {
+ mCurrentRestrictions.putInt(RESTRICTION_KEY_NUMBER, number);
+ mEditNumber.removeTextChangedListener(mWatcherNumber);
+ mEditNumber.setText(String.valueOf(number));
+ mEditNumber.addTextChangedListener(mWatcherNumber);
+ }
+
+ private void updateRank(Context context, String[] ranks, String selectedRank) {
+ mCurrentRestrictions.putString(RESTRICTION_KEY_RANK, selectedRank);
+ mSpinnerRank.setAdapter(new ArrayAdapter<>(context,
+ android.R.layout.simple_spinner_dropdown_item, ranks));
+ mSpinnerRank.setSelection(search(ranks, selectedRank));
+ mSpinnerRank.setOnItemSelectedListener(this);
+ }
+
+ private void updateApprovals(Context context, String[] approvals,
+ String[] selectedApprovals) {
+ mCurrentRestrictions.putStringArray(RESTRICTION_KEY_APPROVALS, selectedApprovals);
+ mLayoutApprovals.removeAllViews();
+ for (String approval : approvals) {
+ Switch sw = new Switch(context);
+ sw.setText(approval);
+ sw.setTag(approval);
+ sw.setChecked(Arrays.asList(selectedApprovals).contains(approval));
+ sw.setOnCheckedChangeListener(this);
+ sw.setId(R.id.approval);
+ mLayoutApprovals.addView(sw);
}
}
/**
- * Unhides the AppRestrictionSchema sample in case it is hidden in this profile.
+ * Saves the value for the "cay_say_hello" restriction of AppRestrictionSchema.
*
* @param activity The activity
+ * @param allow The value to be set for the restriction.
*/
- private void unhideApp(Activity activity) {
- DevicePolicyManager devicePolicyManager =
- (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE);
- devicePolicyManager.setApplicationHidden(
- EnforcerDeviceAdminReceiver.getComponentName(activity),
- PACKAGE_NAME_APP_RESTRICTION_SCHEMA, false);
- Toast.makeText(activity, "Enabled the app", Toast.LENGTH_SHORT).show();
- updateUi(activity);
+ private void saveCanSayHello(Activity activity, boolean allow) {
+ mCurrentRestrictions.putBoolean(RESTRICTION_KEY_SAY_HELLO, allow);
+ saveRestrictions(activity);
+ // Note that the owner app needs to remember the restrictions on its own.
+ editPreferences(activity).putBoolean(RESTRICTION_KEY_SAY_HELLO, allow).apply();
}
/**
- * Loads the restrictions for the AppRestrictionSchema sample. In this implementation, we just
- * read the default value for the "can_say_hello" restriction.
+ * Saves the value for the "message" restriction of AppRestrictionSchema.
*
* @param activity The activity
+ * @param message The value to be set for the restriction.
*/
- private void loadRestrictions(Activity activity) {
- RestrictionsManager restrictionsManager =
- (RestrictionsManager) activity.getSystemService(Context.RESTRICTIONS_SERVICE);
- List<RestrictionEntry> restrictions =
- restrictionsManager.getManifestRestrictions(PACKAGE_NAME_APP_RESTRICTION_SCHEMA);
- for (RestrictionEntry restriction : restrictions) {
- if (RESTRICTION_KEY_SAY_HELLO.equals(restriction.getKey())) {
- mDefaultValueRestrictionSayHello = restriction.getSelectedState();
- }
- }
+ private void saveMessage(Activity activity, String message) {
+ mCurrentRestrictions.putString(RESTRICTION_KEY_MESSAGE, message);
+ saveRestrictions(activity);
+ editPreferences(activity).putString(RESTRICTION_KEY_MESSAGE, message).apply();
}
/**
- * Returns whether the AppRestrictionSchema is currently allowed to say hello to its user. Note
- * that a profile/device owner needs to remember each restriction value on its own.
+ * Saves the value for the "number" restriction of AppRestrictionSchema.
*
* @param activity The activity
- * @return True if the AppRestrictionSchema is allowed to say hello
+ * @param number The value to be set for the restriction.
*/
- private boolean canSayHello(Activity activity) {
- SharedPreferences prefs = activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE);
- return prefs.getBoolean(RESTRICTION_KEY_SAY_HELLO, mDefaultValueRestrictionSayHello);
+ private void saveNumber(Activity activity, int number) {
+ mCurrentRestrictions.putInt(RESTRICTION_KEY_NUMBER, number);
+ saveRestrictions(activity);
+ editPreferences(activity).putInt(RESTRICTION_KEY_NUMBER, number).apply();
}
/**
- * Sets the value for the "cay_say_hello" restriction of AppRestrictionSchema.
+ * Saves the value for the "rank" restriction of AppRestrictionSchema.
*
* @param activity The activity
- * @param allow The value to be set for the restriction.
+ * @param rank The value to be set for the restriction.
*/
- private void allowSayHello(Activity activity, boolean allow) {
+ private void saveRank(Activity activity, String rank) {
+ mCurrentRestrictions.putString(RESTRICTION_KEY_RANK, rank);
+ saveRestrictions(activity);
+ editPreferences(activity).putString(RESTRICTION_KEY_RANK, rank).apply();
+ }
+
+ private void addApproval(Activity activity, String approval) {
+ List<String> approvals = new ArrayList<>(Arrays.asList(
+ mCurrentRestrictions.getStringArray(RESTRICTION_KEY_APPROVALS)));
+ if (approvals.contains(approval)) {
+ return;
+ }
+ approvals.add(approval);
+ saveApprovals(activity, approvals.toArray(new String[approvals.size()]));
+ }
+
+ private void removeApproval(Activity activity, String approval) {
+ List<String> approvals = new ArrayList<>(Arrays.asList(
+ mCurrentRestrictions.getStringArray(RESTRICTION_KEY_APPROVALS)));
+ if (!approval.contains(approval)) {
+ return;
+ }
+ approvals.remove(approval);
+ saveApprovals(activity, approvals.toArray(new String[approvals.size()]));
+ }
+
+ /**
+ * Saves the value for the "approvals" restriction of AppRestrictionSchema.
+ *
+ * @param activity The activity
+ * @param approvals The value to be set for the restriction.
+ */
+ private void saveApprovals(Activity activity, String[] approvals) {
+ mCurrentRestrictions.putStringArray(RESTRICTION_KEY_APPROVALS, approvals);
+ saveRestrictions(activity);
+ editPreferences(activity).putString(RESTRICTION_KEY_APPROVALS,
+ TextUtils.join(DELIMETER, approvals)).apply();
+ }
+
+ private void saveRestrictions(Activity activity) {
DevicePolicyManager devicePolicyManager
= (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
- Bundle restrictions = new Bundle();
- restrictions.putBoolean(RESTRICTION_KEY_SAY_HELLO, allow);
devicePolicyManager.setApplicationRestrictions(
EnforcerDeviceAdminReceiver.getComponentName(activity),
- PACKAGE_NAME_APP_RESTRICTION_SCHEMA, restrictions);
- // The profile/device owner needs to remember the current state of restrictions on its own
- activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE)
- .edit()
- .putBoolean(RESTRICTION_KEY_SAY_HELLO, allow)
- .apply();
- Toast.makeText(activity, allow ? R.string.allowed : R.string.disallowed,
- Toast.LENGTH_SHORT).show();
+ Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA, mCurrentRestrictions);
+ }
+
+ private SharedPreferences.Editor editPreferences(Activity activity) {
+ return activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE).edit();
+ }
+
+ /**
+ * Sequential search
+ *
+ * @param array The string array
+ * @param s The string to search for
+ * @return Index if found. -1 if not found.
+ */
+ private int search(String[] array, String s) {
+ for (int i = 0; i < array.length; ++i) {
+ if (s.equals(array[i])) {
+ return i;
+ }
+ }
+ return -1;
}
}
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java
new file mode 100644
index 0000000..bb4e958
--- /dev/null
+++ b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.apprestrictionenforcer;
+
+public interface Constants {
+
+ /**
+ * Package name of the AppRestrictionSchema sample.
+ */
+ public static final String PACKAGE_NAME_APP_RESTRICTION_SCHEMA
+ = "com.example.android.apprestrictionschema";
+
+}
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/EasyTextWatcher.java b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/EasyTextWatcher.java
new file mode 100644
index 0000000..8e0abb4
--- /dev/null
+++ b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/EasyTextWatcher.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.apprestrictionenforcer;
+
+import android.text.TextWatcher;
+
+/**
+ * This is a wrapper around {@link TextWatcher} that overrides
+ * {@link TextWatcher#beforeTextChanged(CharSequence, int, int, int)} and
+ * {@link TextWatcher#onTextChanged(CharSequence, int, int, int)} with empty bodies.
+ */
+public abstract class EasyTextWatcher implements TextWatcher {
+
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ // Do nothing
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ // Do nothing
+ }
+
+}
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java
index 72224e1..c6b012b 100644
--- a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java
+++ b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java
@@ -18,24 +18,44 @@ package com.example.android.apprestrictionenforcer;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
-public class MainActivity extends FragmentActivity {
+public class MainActivity extends FragmentActivity implements StatusFragment.StatusUpdatedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_real);
if (null == savedInstanceState) {
- DevicePolicyManager manager = (DevicePolicyManager)
- getSystemService(Context.DEVICE_POLICY_SERVICE);
- if (manager.isProfileOwnerApp(getApplicationContext().getPackageName())) {
- // If the managed profile is already set up, we show the main screen.
- showMainFragment();
- } else {
- // If not, we show the set up screen.
+ DevicePolicyManager devicePolicyManager =
+ (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
+ PackageManager packageManager = getPackageManager();
+ if (!devicePolicyManager.isProfileOwnerApp(getApplicationContext().getPackageName())) {
+ // If the managed profile is not yet set up, we show the setup screen.
showSetupProfile();
+ } else {
+ try {
+ ApplicationInfo info = packageManager.getApplicationInfo(
+ Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA,
+ PackageManager.GET_UNINSTALLED_PACKAGES);
+ if (0 == (info.flags & ApplicationInfo.FLAG_INSTALLED)) {
+ // Need to reinstall the sample app
+ showStatusProfile();
+ } else if (devicePolicyManager.isApplicationHidden(
+ EnforcerDeviceAdminReceiver.getComponentName(this),
+ Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA)) {
+ // The app is installed but hidden in this profile
+ showStatusProfile();
+ } else {
+ // Everything is clear; show the main screen
+ showMainFragment();
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ showStatusProfile();
+ }
}
}
}
@@ -46,10 +66,21 @@ public class MainActivity extends FragmentActivity {
.commit();
}
+ private void showStatusProfile() {
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.container, new StatusFragment())
+ .commit();
+ }
+
private void showMainFragment() {
getSupportFragmentManager().beginTransaction()
.replace(R.id.container, new AppRestrictionEnforcerFragment())
.commit();
}
+ @Override
+ public void onStatusUpdated() {
+ showMainFragment();
+ }
+
}
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java
new file mode 100644
index 0000000..f4a4eb7
--- /dev/null
+++ b/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.apprestrictionenforcer;
+
+import android.app.Activity;
+import android.app.admin.DevicePolicyManager;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.TextView;
+import android.widget.Toast;
+
+/**
+ * Provides UI for enabling the target app in this profile. The status of the app can be
+ * uninstalled, hidden, or enabled depending on the situations. This fragment shows suitable
+ * controls for each status.
+ */
+public class StatusFragment extends Fragment implements View.OnClickListener {
+
+ private TextView mTextStatus;
+ private Button mButtonUnhide;
+ private StatusUpdatedListener mListener;
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
+ @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_status, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ mTextStatus = (TextView) view.findViewById(R.id.status);
+ mButtonUnhide = (Button) view.findViewById(R.id.unhide);
+ mButtonUnhide.setOnClickListener(this);
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ mListener = (StatusUpdatedListener) activity;
+ }
+
+ @Override
+ public void onDetach() {
+ mListener = null;
+ super.onDetach();
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ updateUi(getActivity());
+ }
+
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.unhide: {
+ unhideApp(getActivity());
+ break;
+ }
+ }
+ }
+
+ private void updateUi(Activity activity) {
+ PackageManager packageManager = activity.getPackageManager();
+ try {
+ ApplicationInfo info = packageManager.getApplicationInfo(
+ Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA,
+ PackageManager.GET_UNINSTALLED_PACKAGES);
+ DevicePolicyManager devicePolicyManager =
+ (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE);
+ if ((info.flags & ApplicationInfo.FLAG_INSTALLED) != 0) {
+ if (!devicePolicyManager.isApplicationHidden(
+ EnforcerDeviceAdminReceiver.getComponentName(activity),
+ Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA)) {
+ // The app is ready to enforce restrictions
+ // This is unlikely to happen in this sample as unhideApp() handles it.
+ mListener.onStatusUpdated();
+ } else {
+ // The app is installed but hidden in this profile
+ mTextStatus.setText(R.string.status_not_activated);
+ mButtonUnhide.setVisibility(View.VISIBLE);
+ }
+ } else {
+ // Need to reinstall the sample app
+ mTextStatus.setText(R.string.status_need_reinstall);
+ mButtonUnhide.setVisibility(View.GONE);
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ // Need to reinstall the sample app
+ mTextStatus.setText(R.string.status_need_reinstall);
+ mButtonUnhide.setVisibility(View.GONE);
+ }
+ }
+
+ /**
+ * Unhides the AppRestrictionSchema sample in case it is hidden in this profile.
+ *
+ * @param activity The activity
+ */
+ private void unhideApp(Activity activity) {
+ DevicePolicyManager devicePolicyManager =
+ (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE);
+ devicePolicyManager.setApplicationHidden(
+ EnforcerDeviceAdminReceiver.getComponentName(activity),
+ Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA, false);
+ Toast.makeText(activity, "Enabled the app", Toast.LENGTH_SHORT).show();
+ mListener.onStatusUpdated();
+ }
+
+ public interface StatusUpdatedListener {
+ public void onStatusUpdated();
+ }
+
+}
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_app_restriction_enforcer.xml b/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_app_restriction_enforcer.xml
index e6c50a2..0118191 100644
--- a/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_app_restriction_enforcer.xml
+++ b/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_app_restriction_enforcer.xml
@@ -14,31 +14,111 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingBottom="@dimen/vertical_page_margin"
- android:paddingLeft="@dimen/horizontal_page_margin"
- android:paddingRight="@dimen/horizontal_page_margin"
- android:paddingTop="@dimen/vertical_page_margin">
-
- <TextView
- android:id="@+id/status"
+ android:layout_height="match_parent">
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/status_not_installed" />
+ android:orientation="vertical"
+ android:paddingBottom="@dimen/vertical_page_margin"
+ android:paddingLeft="@dimen/horizontal_page_margin"
+ android:paddingRight="@dimen/horizontal_page_margin"
+ android:paddingTop="@dimen/vertical_page_margin">
- <Button
- android:id="@+id/unhide"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/unhide" />
- <Switch
- android:id="@+id/say_hello"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/allow_saying_hello" />
+ <Switch
+ android:id="@+id/say_hello"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/allow_saying_hello"/>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/vertical_page_margin"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:labelFor="@id/message"
+ android:text="@string/message"/>
+
+ <EditText
+ android:id="@id/message"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:inputType="text"
+ android:maxLines="1"/>
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/vertical_page_margin"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:labelFor="@id/number"
+ android:text="@string/number"/>
+
+ <EditText
+ android:id="@id/number"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:inputType="number"
+ android:maxLines="1"/>
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/vertical_page_margin"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/rank"/>
+
+ <Spinner
+ android:id="@+id/rank"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/margin_small"/>
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/vertical_page_margin"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/approvals"/>
+
+ <LinearLayout
+ android:id="@+id/approvals"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/margin_small"
+ android:orientation="vertical"/>
+
+ </LinearLayout>
+
+ </LinearLayout>
-</LinearLayout>
+</ScrollView>
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_status.xml b/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_status.xml
new file mode 100644
index 0000000..a2d60eb
--- /dev/null
+++ b/admin/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_status.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:paddingBottom="@dimen/vertical_page_margin"
+ android:paddingLeft="@dimen/horizontal_page_margin"
+ android:paddingRight="@dimen/horizontal_page_margin"
+ android:paddingTop="@dimen/vertical_page_margin">
+
+ <TextView
+ android:id="@+id/status"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/status_not_installed"/>
+
+ <Button
+ android:id="@+id/unhide"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/unhide"/>
+
+</LinearLayout>
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml b/admin/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml
new file mode 100644
index 0000000..6927d80
--- /dev/null
+++ b/admin/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginBottom="@dimen/margin_medium"
+ android:layout_marginTop="@dimen/margin_medium"
+ android:background="#9000"/>
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/res/values/ids.xml b/admin/AppRestrictionEnforcer/Application/src/main/res/values/ids.xml
new file mode 100644
index 0000000..04ba4ec
--- /dev/null
+++ b/admin/AppRestrictionEnforcer/Application/src/main/res/values/ids.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<resources>
+ <item name="message" type="id"/>
+ <item name="number" type="id"/>
+ <item name="approval" type="id"/>
+</resources>
diff --git a/admin/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml b/admin/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml
index 3029e04..e35daee 100644
--- a/admin/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml
+++ b/admin/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml
@@ -25,4 +25,8 @@
<string name="allowed">Allowed</string>
<string name="disallowed">Disallowed</string>
<string name="profile_name">AppRestrictionEnforcer </string>
+ <string name="message">Message: </string>
+ <string name="number">Number: </string>
+ <string name="rank">Rank: </string>
+ <string name="approvals">Approvals: </string>
</resources>
diff --git a/admin/AppRestrictionEnforcer/gradle/wrapper/gradle-wrapper.properties b/admin/AppRestrictionEnforcer/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..f2e517b 100644
--- a/admin/AppRestrictionEnforcer/gradle/wrapper/gradle-wrapper.properties
+++ b/admin/AppRestrictionEnforcer/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#Mon Dec 01 16:00:44 JST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/admin/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java b/admin/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java
index 76f024f..7b8dba8 100644
--- a/admin/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java
+++ b/admin/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java
@@ -17,10 +17,12 @@
package com.example.android.apprestrictionschema;
import android.content.Context;
+import android.content.RestrictionEntry;
import android.content.RestrictionsManager;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
+import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -30,6 +32,8 @@ import android.widget.Toast;
import com.example.android.common.logger.Log;
+import java.util.List;
+
/**
* Pressing the button on this fragment pops up a simple Toast message. The button is enabled or
* disabled according to the restrictions set by device/profile owner. You can use the
@@ -40,9 +44,21 @@ public class AppRestrictionSchemaFragment extends Fragment implements View.OnCli
// Tag for the logger
private static final String TAG = "AppRestrictionSchemaFragment";
+ private static final String KEY_CAN_SAY_HELLO = "can_say_hello";
+ private static final String KEY_MESSAGE = "message";
+ private static final String KEY_NUMBER = "number";
+ private static final String KEY_RANK = "rank";
+ private static final String KEY_APPROVALS = "approvals";
+
+ // Message to show when the button is clicked (String restriction)
+ private String mMessage;
+
// UI Components
private TextView mTextSayHello;
private Button mButtonSayHello;
+ private TextView mTextNumber;
+ private TextView mTextRank;
+ private TextView mTextApprovals;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@@ -54,48 +70,103 @@ public class AppRestrictionSchemaFragment extends Fragment implements View.OnCli
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
mTextSayHello = (TextView) view.findViewById(R.id.say_hello_explanation);
mButtonSayHello = (Button) view.findViewById(R.id.say_hello);
+ mTextNumber = (TextView) view.findViewById(R.id.your_number);
+ mTextRank = (TextView) view.findViewById(R.id.your_rank);
+ mTextApprovals = (TextView) view.findViewById(R.id.approvals_you_have);
mButtonSayHello.setOnClickListener(this);
}
@Override
public void onResume() {
super.onResume();
- // Update the UI according to the configured restrictions
- RestrictionsManager restrictionsManager =
+ resolveRestrictions();
+ }
+
+ private void resolveRestrictions() {
+ RestrictionsManager manager =
(RestrictionsManager) getActivity().getSystemService(Context.RESTRICTIONS_SERVICE);
- Bundle restrictions = restrictionsManager.getApplicationRestrictions();
- updateUI(restrictions);
+ Bundle restrictions = manager.getApplicationRestrictions();
+ List<RestrictionEntry> entries = manager.getManifestRestrictions(getActivity().getApplicationContext().getPackageName());
+ for (RestrictionEntry entry : entries) {
+ String key = entry.getKey();
+ Log.d(TAG, "key: " + key);
+ if (key.equals(KEY_CAN_SAY_HELLO)) {
+ updateCanSayHello(entry, restrictions);
+ } else if (key.equals(KEY_MESSAGE)) {
+ updateMessage(entry, restrictions);
+ } else if (key.equals(KEY_NUMBER)) {
+ updateNumber(entry, restrictions);
+ } else if (key.equals(KEY_RANK)) {
+ updateRank(entry, restrictions);
+ } else if (key.equals(KEY_APPROVALS)) {
+ updateApprovals(entry, restrictions);
+ }
+ }
+ }
+
+ private void updateCanSayHello(RestrictionEntry entry, Bundle restrictions) {
+ boolean canSayHello;
+ if (restrictions == null || !restrictions.containsKey(KEY_CAN_SAY_HELLO)) {
+ canSayHello = entry.getSelectedState();
+ } else {
+ canSayHello = restrictions.getBoolean(KEY_CAN_SAY_HELLO);
+ }
+ mTextSayHello.setText(canSayHello ?
+ R.string.explanation_can_say_hello_true :
+ R.string.explanation_can_say_hello_false);
+ mButtonSayHello.setEnabled(canSayHello);
}
- private void updateUI(Bundle restrictions) {
- if (canSayHello(restrictions)) {
- mTextSayHello.setText(R.string.explanation_can_say_hello_true);
- mButtonSayHello.setEnabled(true);
+ private void updateMessage(RestrictionEntry entry, Bundle restrictions) {
+ if (restrictions == null || !restrictions.containsKey(KEY_MESSAGE)) {
+ mMessage = entry.getSelectedString();
} else {
- mTextSayHello.setText(R.string.explanation_can_say_hello_false);
- mButtonSayHello.setEnabled(false);
+ mMessage = restrictions.getString(KEY_MESSAGE);
}
}
- /**
- * Returns the current status of the restriction.
- *
- * @param restrictions The application restrictions
- * @return True if the app is allowed to say hello
- */
- private boolean canSayHello(Bundle restrictions) {
- final boolean defaultValue = false;
- boolean canSayHello = restrictions == null ? defaultValue :
- restrictions.getBoolean("can_say_hello", defaultValue);
- Log.d(TAG, "canSayHello: " + canSayHello);
- return canSayHello;
+ private void updateNumber(RestrictionEntry entry, Bundle restrictions) {
+ int number;
+ if (restrictions == null || !restrictions.containsKey(KEY_NUMBER)) {
+ number = entry.getIntValue();
+ } else {
+ number = restrictions.getInt(KEY_NUMBER);
+ }
+ mTextNumber.setText(getString(R.string.your_number, number));
+ }
+
+ private void updateRank(RestrictionEntry entry, Bundle restrictions) {
+ String rank;
+ if (restrictions == null || !restrictions.containsKey(KEY_RANK)) {
+ rank = entry.getSelectedString();
+ } else {
+ rank = restrictions.getString(KEY_RANK);
+ }
+ mTextRank.setText(getString(R.string.your_rank, rank));
+ }
+
+ private void updateApprovals(RestrictionEntry entry, Bundle restrictions) {
+ String[] approvals;
+ if (restrictions == null || !restrictions.containsKey(KEY_APPROVALS)) {
+ approvals = entry.getAllSelectedStrings();
+ } else {
+ approvals = restrictions.getStringArray(KEY_APPROVALS);
+ }
+ String text;
+ if (approvals == null || approvals.length == 0) {
+ text = getString(R.string.none);
+ } else {
+ text = TextUtils.join(", ", approvals);
+ }
+ mTextApprovals.setText(getString(R.string.approvals_you_have, text));
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.say_hello: {
- Toast.makeText(getActivity(), R.string.message_hello, Toast.LENGTH_SHORT).show();
+ Toast.makeText(getActivity(), getString(R.string.message, mMessage),
+ Toast.LENGTH_SHORT).show();
break;
}
}
diff --git a/admin/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml b/admin/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml
index fc5e23d..18ca0a4 100644
--- a/admin/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml
+++ b/admin/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml
@@ -14,24 +14,60 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:padding="@dimen/margin_medium">
-
- <TextView
- android:id="@+id/say_hello_explanation"
+
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/explanation_can_say_hello_true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:orientation="vertical"
+ android:padding="@dimen/margin_medium">
- <Button
- android:id="@+id/say_hello"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/margin_medium"
- android:text="@string/action_can_say_hello" />
+ <TextView
+ android:id="@+id/say_hello_explanation"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ tools:text="@string/explanation_can_say_hello_true"/>
+
+ <Button
+ android:id="@+id/say_hello"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/margin_medium"
+ android:text="@string/action_can_say_hello"/>
+
+ <include layout="@layout/separator"/>
+
+ <TextView
+ android:id="@+id/your_number"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ tools:text="@string/your_number"/>
+
+ <include layout="@layout/separator"/>
+
+ <TextView
+ android:id="@+id/your_rank"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ tools:text="@string/your_rank"/>
+
+ <include layout="@layout/separator"/>
+
+ <TextView
+ android:id="@+id/approvals_you_have"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ tools:text="@string/approvals_you_have"/>
+
+ </LinearLayout>
-</LinearLayout>
+</ScrollView>
diff --git a/admin/AppRestrictionSchema/Application/src/main/res/layout/separator.xml b/admin/AppRestrictionSchema/Application/src/main/res/layout/separator.xml
new file mode 100644
index 0000000..6927d80
--- /dev/null
+++ b/admin/AppRestrictionSchema/Application/src/main/res/layout/separator.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginBottom="@dimen/margin_medium"
+ android:layout_marginTop="@dimen/margin_medium"
+ android:background="#9000"/>
diff --git a/admin/AppRestrictionSchema/Application/src/main/res/values/restriction_values.xml b/admin/AppRestrictionSchema/Application/src/main/res/values/restriction_values.xml
new file mode 100644
index 0000000..558d097
--- /dev/null
+++ b/admin/AppRestrictionSchema/Application/src/main/res/values/restriction_values.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<resources>
+
+ <!-- Bool restriction -->
+ <string name="title_can_say_hello">Can say hello</string>
+ <string name="description_can_say_hello">Whether the app can say hello to the user</string>
+ <bool name="default_can_say_hello">false</bool>
+
+ <!-- String restriction -->
+ <string name="title_message">Message</string>
+ <string name="description_message">A message string to show</string>
+ <string name="default_message">Hello!</string>
+
+ <!-- Integer restriction -->
+ <string name="title_number">Number</string>
+ <string name="description_number">Sample integer value</string>
+ <integer name="default_number">32582657</integer>
+
+ <!-- Choice restriction -->
+ <string name="title_rank">Rank</string>
+ <string name="description_rank">Rank of the user</string>
+ <string-array name="entries_rank">
+ <item>Apprentice</item>
+ <item>Intermediate</item>
+ <item>Master</item>
+ </string-array>
+ <string name="entry_value_rank_apprentice">apprentice</string>
+ <string name="entry_value_rank_intermediate">intermediate</string>
+ <string name="entry_value_rank_master">master</string>
+ <string-array name="entry_values_rank">
+ <item>@string/entry_value_rank_apprentice</item>
+ <item>@string/entry_value_rank_intermediate</item>
+ <item>@string/entry_value_rank_master</item>
+ </string-array>
+ <string name="default_rank">@string/entry_value_rank_apprentice</string>
+
+ <!-- Multi-select restriction -->
+ <string name="title_approvals">Approvals</string>
+ <string name="description_approvals">Approvals</string>
+ <string-array name="entries_approvals">
+ <item>Read</item>
+ <item>Write</item>
+ <item>Execute</item>
+ </string-array>
+ <string name="entry_value_approvals_read">read</string>
+ <string name="entry_value_approvals_write">write</string>
+ <string name="entry_value_approvals_execute">execute</string>
+ <string-array name="entry_values_approvals">
+ <item>@string/entry_value_approvals_read</item>
+ <item>@string/entry_value_approvals_write</item>
+ <item>@string/entry_value_approvals_execute</item>
+ </string-array>
+ <string-array name="default_approvals">
+ <!-- Empty -->
+ </string-array>
+
+ <!-- Hidden restriction -->
+ <string name="title_secret_code">Secret code</string>
+ <string name="description_secret_code">This restriction is hidden and will not be shown to the administrator.</string>
+ <string name="default_secret_code">(Hidden restriction must have some default value)</string>
+
+</resources>
diff --git a/admin/AppRestrictionSchema/Application/src/main/res/values/strings.xml b/admin/AppRestrictionSchema/Application/src/main/res/values/strings.xml
index b8ef110..6dce123 100644
--- a/admin/AppRestrictionSchema/Application/src/main/res/values/strings.xml
+++ b/admin/AppRestrictionSchema/Application/src/main/res/values/strings.xml
@@ -16,11 +16,14 @@ limitations under the License.
-->
<resources>
- <string name="title_can_say_hello">Can say hello</string>
- <string name="description_can_say_hello">Whether the app can say hello to the user</string>
<string name="explanation_can_say_hello_true">I can say hello to you.</string>
<string name="explanation_can_say_hello_false">I am restricted from saying hello to you.</string>
<string name="action_can_say_hello">Say hello</string>
- <string name="message_hello">Hello!</string>
+ <string name="message">All I can say is \"%s\".</string>
-</resources> \ No newline at end of file
+ <string name="your_number">Your number: %d</string>
+ <string name="your_rank">Your rank: %s</string>
+ <string name="approvals_you_have">Approvals you have: %s</string>
+ <string name="none">none</string>
+
+</resources>
diff --git a/admin/AppRestrictionSchema/Application/src/main/res/xml/app_restrictions.xml b/admin/AppRestrictionSchema/Application/src/main/res/xml/app_restrictions.xml
index 409527f..9e47f45 100644
--- a/admin/AppRestrictionSchema/Application/src/main/res/xml/app_restrictions.xml
+++ b/admin/AppRestrictionSchema/Application/src/main/res/xml/app_restrictions.xml
@@ -16,11 +16,55 @@ limitations under the License.
-->
<restrictions xmlns:android="http://schemas.android.com/apk/res/android">
+ <!--
+ Refer to the javadoc of RestrictionsManager for detail of this file.
+ https://developer.android.com/reference/android/content/RestrictionsManager.html
+ -->
+
<restriction
- android:defaultValue="false"
+ android:defaultValue="@bool/default_can_say_hello"
android:description="@string/description_can_say_hello"
android:key="can_say_hello"
android:restrictionType="bool"
- android:title="@string/title_can_say_hello" />
+ android:title="@string/title_can_say_hello"/>
+
+ <restriction
+ android:defaultValue="@string/default_message"
+ android:description="@string/description_message"
+ android:key="message"
+ android:restrictionType="string"
+ android:title="@string/title_message"/>
+
+ <restriction
+ android:defaultValue="@integer/default_number"
+ android:description="@string/description_number"
+ android:key="number"
+ android:restrictionType="integer"
+ android:title="@string/title_number"/>
+
+ <restriction
+ android:defaultValue="@string/default_rank"
+ android:description="@string/description_rank"
+ android:entries="@array/entries_rank"
+ android:entryValues="@array/entry_values_rank"
+ android:key="rank"
+ android:restrictionType="choice"
+ android:title="@string/title_rank"/>
+
+ <restriction
+ android:defaultValue="@array/default_approvals"
+ android:description="@string/description_approvals"
+ android:entries="@array/entries_approvals"
+ android:entryValues="@array/entry_values_approvals"
+ android:key="approvals"
+ android:restrictionType="multi-select"
+ android:title="@string/title_approvals"/>
+
+ <restriction
+ android:defaultValue="@string/default_secret_code"
+ android:description="@string/description_secret_code"
+ android:key="secret_code"
+ android:restrictionType="hidden"
+ android:title="@string/title_secret_code"/>
</restrictions>
diff --git a/admin/AppRestrictionSchema/gradle/wrapper/gradle-wrapper.properties b/admin/AppRestrictionSchema/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..fb79885 100644
--- a/admin/AppRestrictionSchema/gradle/wrapper/gradle-wrapper.properties
+++ b/admin/AppRestrictionSchema/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#Mon Dec 01 11:44:58 JST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/admin/AppRestrictionSchema/screenshots/main.png b/admin/AppRestrictionSchema/screenshots/main.png
new file mode 100644
index 0000000..0d0d9c4
--- /dev/null
+++ b/admin/AppRestrictionSchema/screenshots/main.png
Binary files differ
diff --git a/admin/AppRestrictionSchema/template-params.xml b/admin/AppRestrictionSchema/template-params.xml
index c6ec4a1..6603034 100644
--- a/admin/AppRestrictionSchema/template-params.xml
+++ b/admin/AppRestrictionSchema/template-params.xml
@@ -39,4 +39,72 @@
<common src="logger" />
<common src="activities" />
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Device Admin</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>ADVANCED</level>
+ <icon>Application/main/big_icon.png</icon>
+ <screenshots>
+ <img>screenshots/main.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.content.RestrictionsManager</android>
+ </api_refs>
+
+ <description>
+A basic app showing how to allow a device administrator to restrict user
+activities using the Android Device Administration API. The app exports
+a custom policy that enables or disables a UI control. Device Administration
+applications are able to enforce a specific value for this policy, as
+directed by enterprise administrators.
+ </description>
+
+ <intro>
+<![CDATA[
+The [Android Device Administration API][1] allows enterprise administrators to
+enforce specific policies on a managed device. The system provides policies
+that control settings such as password complexity, screen lock, or camera
+availability. Developers can also augment this list with custom policies
+that control specific features within their applications. For example,
+a web browser could provide access to a whitelist of allowed domains.
+
+The list of policies exposed by an app must be specified using a file
+inside of the `res/xml` directory, using the `<restriction>` tag:
+
+```xml
+<restrictions xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <restriction
+ android:defaultValue="false"
+ android:description="@string/description_can_say_hello"
+ android:key="can_say_hello"
+ android:restrictionType="bool"
+ android:title="@string/title_can_say_hello" />
+
+</restrictions>
+```
+
+In this sample, that file can be found at
+`Application/src/main/res/xml/app_restrictions.xml`. This file must be
+also be declared inside of `ApplicationManifest.xml` using a `<meta-data>`
+element:
+
+```xml
+<meta-data
+ android:name="android.content.APP_RESTRICTIONS"
+ android:resource="@xml/app_restrictions" />
+```
+
+At runtime, the current list of restrictions enforced by policy can be
+checked by calling [RestrictionsManager.getApplicationRestrictions()][2].
+
+[1]: http://developer.android.com/guide/topics/admin/device-admin.html
+[2]: https://developer.android.com/reference/android/content/RestrictionsManager.html#getApplicationRestrictions()
+]]>
+ </intro>
+ </metadata>
+
</sample>
diff --git a/admin/BasicManagedProfile/gradle/wrapper/gradle-wrapper.properties b/admin/BasicManagedProfile/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/admin/BasicManagedProfile/gradle/wrapper/gradle-wrapper.properties
+++ b/admin/BasicManagedProfile/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/admin/BasicManagedProfile/screenshots/icon-web.png b/admin/BasicManagedProfile/screenshots/icon-web.png
new file mode 100755
index 0000000..9ffff0d
--- /dev/null
+++ b/admin/BasicManagedProfile/screenshots/icon-web.png
Binary files differ
diff --git a/admin/BasicManagedProfile/screenshots/main.png b/admin/BasicManagedProfile/screenshots/main.png
new file mode 100644
index 0000000..ecb066e
--- /dev/null
+++ b/admin/BasicManagedProfile/screenshots/main.png
Binary files differ
diff --git a/admin/BasicManagedProfile/screenshots/not_set_up.png b/admin/BasicManagedProfile/screenshots/not_set_up.png
new file mode 100644
index 0000000..4db7e9f
--- /dev/null
+++ b/admin/BasicManagedProfile/screenshots/not_set_up.png
Binary files differ
diff --git a/admin/BasicManagedProfile/screenshots/set_up.png b/admin/BasicManagedProfile/screenshots/set_up.png
new file mode 100644
index 0000000..18d3998
--- /dev/null
+++ b/admin/BasicManagedProfile/screenshots/set_up.png
Binary files differ
diff --git a/admin/BasicManagedProfile/template-params.xml b/admin/BasicManagedProfile/template-params.xml
index c1ba1cb..ff926ab 100644
--- a/admin/BasicManagedProfile/template-params.xml
+++ b/admin/BasicManagedProfile/template-params.xml
@@ -42,4 +42,61 @@
</strings>
<template src="base"/>
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Device Admin</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>ADVANCED</level>
+ <icon>screenshotsicon-web.png</icon>
+ <screenshots>
+ <img>screenshots/not_set_up.png</img>
+ <img>screenshots/set_up.png</img>
+ <img>screenshots/main.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.app.admin.DevicePolicyManager</android>
+ <android>android.app.admin.DeviceAdminReceiver</android>
+ </api_refs>
+
+ <description>
+<![CDATA[
+This sample demonstrates basic functionalities of Managed Profile API
+introduced in Android 5.0 Lollipop. You can set up this app as a
+profile owner, and use this app to enable/disable apps in the newly
+created managed profile. You can also set restrictions to some apps,
+enable/disable Intent forwarding between profiles, and wipe out all
+the data associated with the profile.
+]]>
+ </description>
+
+ <intro>
+<![CDATA[
+As of Android 5.0, DevicePolicyManager introduces new features to
+support managed profile.
+
+To set up this app as a profile owner, you need to encrypt your device
+(you are prompted to do if you haven't). This doesn't wipe out the
+device, but be aware that you can set up only one managed profile at a
+time.
+
+[isProfileOwnerApp][1] can be used to determine if a particular
+package is registered as the profile owner for the current user. You
+can initiate the provisioning flow of a managed profile with Intent of
+[ACTION_PROVISION_MANAGED_PROFILE][2].
+
+You have to implement a class extending [DeviceAdminReceiver][3] to
+receive the result of the provisioning flow. Use
+[setProfileEnabled][4] to enable the newly created profile, and your
+app is now set up as a profile owner.
+
+[1]: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)
+[2]: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE
+[3]: http://developer.android.com/reference/android/app/admin/DeviceAdminReceiver.html
+[4]: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setProfileEnabled(android.content.ComponentName)
+]]>
+ </intro>
+ </metadata>
+
</sample>
diff --git a/background/JobScheduler/Application/src/main/java/com/example/android/jobscheduler/MainActivity.java b/background/JobScheduler/Application/src/main/java/com/example/android/jobscheduler/MainActivity.java
index f495bf1..624e22d 100644
--- a/background/JobScheduler/Application/src/main/java/com/example/android/jobscheduler/MainActivity.java
+++ b/background/JobScheduler/Application/src/main/java/com/example/android/jobscheduler/MainActivity.java
@@ -140,9 +140,9 @@ public class MainActivity extends Activity {
boolean requiresUnmetered = mWiFiConnectivityRadioButton.isChecked();
boolean requiresAnyConnectivity = mAnyConnectivityRadioButton.isChecked();
if (requiresUnmetered) {
- builder.setRequiredNetworkCapabilities(JobInfo.NetworkType.UNMETERED);
+ builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED);
} else if (requiresAnyConnectivity) {
- builder.setRequiredNetworkCapabilities(JobInfo.NetworkType.ANY);
+ builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);
}
builder.setRequiresDeviceIdle(mRequiresIdleCheckbox.isChecked());
builder.setRequiresCharging(mRequiresChargingCheckBox.isChecked());
diff --git a/background/JobScheduler/gradle/wrapper/gradle-wrapper.properties b/background/JobScheduler/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/background/JobScheduler/gradle/wrapper/gradle-wrapper.properties
+++ b/background/JobScheduler/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/background/alarms/RepeatingAlarm/gradle/wrapper/gradle-wrapper.properties b/background/alarms/RepeatingAlarm/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/background/alarms/RepeatingAlarm/gradle/wrapper/gradle-wrapper.properties
+++ b/background/alarms/RepeatingAlarm/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/build.gradle b/build.gradle
index 37cbf22..082f67d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -24,8 +24,8 @@ List<String> samples = [
"ui/actionbarcompat/ActionBarCompat-Styled",
"ui/actionbarcompat/ActionBarCompat-ListPopupMenu",
"ui/actionbarcompat/ActionBarCompat-ShareActionProvider",
-"ui/notifications/BasicNotifications",
-"ui/notifications/CustomNotifications",
+"notification/BasicNotifications",
+"notification/CustomNotifications",
"ui/actionbar/DoneBar",
"ui/graphics/PdfRendererBasic",
"ui/window/BasicImmersiveMode",
@@ -47,6 +47,7 @@ List<String> samples = [
"ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic",
"ui/views/SwipeRefreshLayout/SwipeRefreshListFragment",
"ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews",
+"media/MediaBrowserService",
"media/MediaRouter",
"media/MediaEffects",
"admin/BasicManagedProfile",
@@ -60,10 +61,10 @@ List<String> samples = [
"ui/views/FloatingActionButton/FloatingActionButtonBasic",
"ui/views/RevealEffect/RevealEffectBasic",
"background/JobScheduler",
-"wearable/wear/SynchronizedNotifications",
"ui/views/RecyclerView",
"ui/views/CardView",
-"ui/notifications/LNotifications",
+"notification/LNotifications",
+"notification/MessagingService",
"ui/DrawableTinting",
"ui/Interpolator",
"media/HdrViewfinder",
@@ -71,7 +72,7 @@ List<String> samples = [
"ui/activitytasks/DocumentCentricRelinquishIdentity",
"admin/AppRestrictionEnforcer",
"admin/AppRestrictionSchema",
-"bluetooth/BluetoothChat",
+"connectivity/bluetooth/BluetoothChat",
"wearable/wear/AgendaData",
"wearable/wear/DataLayer",
"wearable/wear/DelayedConfirmation",
@@ -87,8 +88,14 @@ List<String> samples = [
"wearable/wear/RecipeAssistant",
"wearable/wear/SkeletonWearableApp",
"wearable/wear/SpeedTracker",
+"wearable/wear/SynchronizedNotifications",
"wearable/wear/Timer",
-"wearable/wear/WatchViewStub"
+"wearable/wear/WatchViewStub",
+"wearable/wear/WatchFace",
+"content/webview/PermissionRequest",
+"content/documentsUi/DirectorySelection",
+"system/AppUsageStatistics",
+"media/ScreenCapture",
]
List<String> taskNames = [
diff --git a/connectivity/bluetooth/BluetoothChat/gradle/wrapper/gradle-wrapper.properties b/connectivity/bluetooth/BluetoothChat/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/connectivity/bluetooth/BluetoothChat/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/bluetooth/BluetoothChat/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/bluetooth/BluetoothChat/screenshots/1-launch.png b/connectivity/bluetooth/BluetoothChat/screenshots/1-launch.png
new file mode 100644
index 0000000..6b6741e
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothChat/screenshots/1-launch.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothChat/screenshots/2-devices.png b/connectivity/bluetooth/BluetoothChat/screenshots/2-devices.png
new file mode 100644
index 0000000..db31dc0
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothChat/screenshots/2-devices.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothChat/screenshots/3-chat.png b/connectivity/bluetooth/BluetoothChat/screenshots/3-chat.png
new file mode 100644
index 0000000..65830e8
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothChat/screenshots/3-chat.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothChat/screenshots/icon-web.png b/connectivity/bluetooth/BluetoothChat/screenshots/icon-web.png
new file mode 100644
index 0000000..737f347
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothChat/screenshots/icon-web.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothChat/template-params.xml b/connectivity/bluetooth/BluetoothChat/template-params.xml
index a4ca497..2bf81c3 100644
--- a/connectivity/bluetooth/BluetoothChat/template-params.xml
+++ b/connectivity/bluetooth/BluetoothChat/template-params.xml
@@ -47,4 +47,59 @@
<!-- Include common code modules by uncommenting them below. -->
<common src="logger" />
<common src="activities"/>
+
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Connectivity</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>ADVANCED</level>
+ <icon>screenshots/icon-web.png</icon>
+ <screenshots>
+ <img>screenshots/1-launch.png</img>
+ <img>screenshots/2-devices.png</img>
+ <img>screenshots/3-chat.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.bluetooth.BluetoothAdapter</android>
+ <android>android.bluetooth.BluetoothDevice</android>
+ <android>android.bluetooth.BluetoothServerSocket</android>
+ <android>android.bluetooth.BluetoothSocket</android>
+ </api_refs>
+
+ <description>
+<![CDATA[
+This sample shows how to implement two-way text chat over Bluetooth between two Android devices, using
+all the fundamental Bluetooth API capabilities.
+]]>
+ </description>
+
+ <intro>
+<![CDATA[
+This sample should be run on two Android devices at the same time, to establish a two-way chat over
+Bluetooth between the devices. Select "Made discoverable" in overflow menu on one device and click
+on the Bluetooth icon on the other one, to find the device and establish the connection.
+
+The sample demonstrates the following, using the [Bluetooth API][1]:
+
+1. [Setting up][2] Bluetooth
+2. [Scanning][3] for other Bluetooth devices
+3. [Querying][4] the local Bluetooth adapter for paired Bluetooth devices
+4. [Establishing RFCOMM][5] channels/sockets
+5. [Connecting][6] to a remote device
+6. [Transfering][7] data over Bluetooth
+
+[1]: http://developer.android.com/guide/topics/connectivity/bluetooth.html
+[2]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#Permissions
+[3]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#FindingDevices
+[4]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#QueryingPairedDevices
+[5]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#ConnectingDevices
+[6]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#ConnectingAsAClient
+[7]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#ManagingAConnection
+]]>
+ </intro>
+ </metadata>
+
+
</sample>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties b/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/bluetooth/BluetoothLeGatt/screenshots/1-main.png b/connectivity/bluetooth/BluetoothLeGatt/screenshots/1-main.png
new file mode 100644
index 0000000..19ceb47
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/screenshots/1-main.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/screenshots/2-detail.png b/connectivity/bluetooth/BluetoothLeGatt/screenshots/2-detail.png
new file mode 100644
index 0000000..0bb0598
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/screenshots/2-detail.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/screenshots/icon-web.png b/connectivity/bluetooth/BluetoothLeGatt/screenshots/icon-web.png
new file mode 100644
index 0000000..9420668
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/screenshots/icon-web.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/template-params.xml b/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
index 323e1d7..b699f67 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
+++ b/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
@@ -33,4 +33,43 @@
<template src="base"/>
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Connectivity</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>ADVANCED</level>
+ <icon>screenshots/icon-web.png</icon>
+ <screenshots>
+ <img>screenshots/1-main.png</img>
+ <img>screenshots/2-detail.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.app.Service</android>
+ <android>android.bluetooth.BluetoothGattService</android>
+ </api_refs>
+ <description>
+<![CDATA[
+This sample demonstrates how to use the Bluetooth LE Generic Attribute Profile (GATT)
+to transmit arbitrary data between devices.
+]]>
+ </description>
+
+ <intro>
+<![CDATA[
+This sample shows a list of available Bluetooth LE devices and provides
+an interface to connect, display data and display GATT services and
+characteristics supported by the devices.
+
+It creates a [Service][1] for managing connection and data communication with a GATT server
+hosted on a given Bluetooth LE device.
+
+The Activities communicate with the Service, which in turn interacts with the [Bluetooth LE API][2].
+
+[1]:http://developer.android.com/reference/android/app/Service.html
+[2]:https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html
+]]>
+ </intro>
+ </metadata>
</sample>
diff --git a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-hdpi/ic_launcher.png
index 22ce606..fad6812 100755
--- a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-mdpi/ic_launcher.png
index f21e17b..04cf115 100755
--- a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xhdpi/ic_launcher.png
index 64b8059..53736df 100755
--- a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
index 6b4434a..6afbfca 100755
--- a/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ b/connectivity/network/BasicNetworking/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/network/BasicNetworking/screenshots/big_icon.png b/connectivity/network/BasicNetworking/screenshots/big_icon.png
new file mode 100644
index 0000000..a9c8849
--- /dev/null
+++ b/connectivity/network/BasicNetworking/screenshots/big_icon.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/screenshots/start.png b/connectivity/network/BasicNetworking/screenshots/start.png
new file mode 100644
index 0000000..e244f18
--- /dev/null
+++ b/connectivity/network/BasicNetworking/screenshots/start.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/screenshots/tested.png b/connectivity/network/BasicNetworking/screenshots/tested.png
new file mode 100644
index 0000000..96359c6
--- /dev/null
+++ b/connectivity/network/BasicNetworking/screenshots/tested.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/template-params.xml b/connectivity/network/BasicNetworking/template-params.xml
index 3413740..efdabbd 100644
--- a/connectivity/network/BasicNetworking/template-params.xml
+++ b/connectivity/network/BasicNetworking/template-params.xml
@@ -25,15 +25,51 @@
<strings>
<intro>
<![CDATA[
- This sample demonstrates how to use the ConnectivityManager to determine if you have
- a network connection, and if so, what type of connection it is.
- \n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information
- on the active connection, and then the connection type is printed to an on-screen console.
+ This sample demonstrates how to use the ConnectivityManager to determine if you have
+ a network connection, and if so, what type of connection it is.
+ \n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information
+ on the active connection, and then the connection type is printed to an on-screen console.
]]>
</intro>
</strings>
<template src="base"/>
<common src="logger"/>
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Connectivity</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>INTERMEDIATE</level>
+ <icon>screenshots/big_icon.png</icon>
+ <screenshots>
+ <img>screenshots/start.png</img>
+ <img>screenshots/tested.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.net.ConnectivityManager</android>
+ <android>android.net.NetworkInfo</android>
+ </api_refs>
+ <description>
+<![CDATA[
+This sample demonstrates how to check network connectivity with Android APIs.
+]]>
+ </description>
+ <intro>
+<![CDATA[
+It utilizes the [`ConnectivityManager`][1] to determine if you have
+a network connection, and if so, what type of connection it is.
+
+A [`NetworkInfo`][2] object is retrieved from the ConnectivityManager, which contains information
+on the active connection, and then the connection type is printed to an on-screen console.
+Multiple types of connectivity can be displayed and could be used to take different measures
+in actual production code.
+
+[1]: https://developer.android.com/reference/android/net/ConnectivityManager.html
+[2]: https://developer.android.com/reference/android/net/NetworkInfo.html
+]]>
+ </intro>
+ </metadata>
</sample>
diff --git a/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/nfc/BeamLargeFiles/Application/src/main/AndroidManifest.xml b/connectivity/nfc/BeamLargeFiles/Application/src/main/AndroidManifest.xml
index 6ef958d..b084253 100644
--- a/connectivity/nfc/BeamLargeFiles/Application/src/main/AndroidManifest.xml
+++ b/connectivity/nfc/BeamLargeFiles/Application/src/main/AndroidManifest.xml
@@ -45,7 +45,7 @@
<!-- Content provider, used to provide images for transmission. -->
<provider
- android:name=".AssetProvider"
+ android:name="com.example.android.common.assetprovider.AssetProvider"
android:authorities="com.example.android.beamlargefiles.files"
android:exported="true"/>
diff --git a/connectivity/nfc/BeamLargeFiles/Application/src/main/res/menu/main.xml b/connectivity/nfc/BeamLargeFiles/Application/src/main/res/menu/main.xml
new file mode 100644
index 0000000..8de3baa
--- /dev/null
+++ b/connectivity/nfc/BeamLargeFiles/Application/src/main/res/menu/main.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android" />
+
diff --git a/connectivity/nfc/BeamLargeFiles/gradle/wrapper/gradle-wrapper.properties b/connectivity/nfc/BeamLargeFiles/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..0c71e76 100644
--- a/connectivity/nfc/BeamLargeFiles/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/nfc/BeamLargeFiles/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/nfc/BeamLargeFiles/template-params.xml b/connectivity/nfc/BeamLargeFiles/template-params.xml
index 947cf70..79142a4 100644
--- a/connectivity/nfc/BeamLargeFiles/template-params.xml
+++ b/connectivity/nfc/BeamLargeFiles/template-params.xml
@@ -16,6 +16,7 @@
-->
<sample>
<name>BeamLargeFiles</name>
+ <group>Connectivity</group>
<package>com.example.android.beamlargefiles</package>
diff --git a/connectivity/nfc/CardEmulation/gradle/wrapper/gradle-wrapper.properties b/connectivity/nfc/CardEmulation/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/connectivity/nfc/CardEmulation/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/nfc/CardEmulation/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/nfc/CardReader/gradle/wrapper/gradle-wrapper.properties b/connectivity/nfc/CardReader/gradle/wrapper/gradle-wrapper.properties
index a7bd4a7..4819af8 100644
--- a/connectivity/nfc/CardReader/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/nfc/CardReader/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/sync/BasicSyncAdapter/Application/src/main/big_icon.png b/connectivity/sync/BasicSyncAdapter/Application/src/main/big_icon.png
new file mode 100644
index 0000000..7904a13
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/Application/src/main/big_icon.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-hdpi/ic_launcher.png
index a0f7005..7920c98 100644
--- a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-mdpi/ic_launcher.png
index a085462..1de60fe 100644
--- a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xhdpi/ic_launcher.png
index 4f78eb8..fc4bfeb 100644
--- a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
index b198ee3..646ce94 100644
--- a/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ b/connectivity/sync/BasicSyncAdapter/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties b/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
index d7f03cf..0c71e76 100644
--- a/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/connectivity/sync/BasicSyncAdapter/screenshots/icon-web.png b/connectivity/sync/BasicSyncAdapter/screenshots/icon-web.png
new file mode 100644
index 0000000..7904a13
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/screenshots/icon-web.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/screenshots/main.png b/connectivity/sync/BasicSyncAdapter/screenshots/main.png
new file mode 100644
index 0000000..c0a9d48
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/screenshots/main.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/template-params.xml b/connectivity/sync/BasicSyncAdapter/template-params.xml
index 7fba138..304a682 100644
--- a/connectivity/sync/BasicSyncAdapter/template-params.xml
+++ b/connectivity/sync/BasicSyncAdapter/template-params.xml
@@ -35,6 +35,52 @@
]]>
</intro>
</strings>
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Background, Connectivity</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>INTERMEDIATE</level>
+ <icon>screenshots/icon-web.png</icon>
+ <screenshots>
+ <img>screenshots/main.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.app.Service</android>
+ <android>android.content.AbstractThreadedSyncAdapter</android>
+ <android>android.content.ContentProvider</android>
+ <android>android.content.ContentResolver</android>
+ <android>android.content.SyncResult</android>
+ <android>android.database.sqlite.SQLiteDatabase</android>
+ </api_refs>
+ <description>
+<![CDATA[
+This sample demonstrates using SyncAdapter to fetch background
+data for an app. It covers the creation of the required Service
+that the OS uses to initiate the background data sync as well as
+scheduling syncs with background data.
+]]>
+ </description>
+ <intro>
+<![CDATA[
+This sample demonstrates using SyncAdapter to fetch background data
+for an app. SyncAdapters can be used to execute your data transfer
+code at configurable intervals, while efficiently using battery and
+other system resources.
+
+This sample implements all the required elements of a sync adapter.
+- Creates a sync adapter class.
+- Creates a bound Service which the OS uses to initiate a sync.
+- Defines the sync adapter properties in an XML resource file.
+- Declares the bound Service in the app manifest.
+
+For more on SyncAdapters refer to [Transferring Data Using Sync Adapters][1]
+
+[1]: http://developer.android.com/training/sync-adapters/index.html
+]]>
+ </intro>
+ </metadata>
<template src="base"/>
<common src="accounts"/>
diff --git a/media/MediaEffects/MediaEffectsSample/.gitignore b/content/WidgetData/Application/.gitignore
index 6eb878d..6eb878d 100644
--- a/media/MediaEffects/MediaEffectsSample/.gitignore
+++ b/content/WidgetData/Application/.gitignore
diff --git a/content/WidgetData/Application/README-fragmentview.txt b/content/WidgetData/Application/README-fragmentview.txt
new file mode 100644
index 0000000..38d903f
--- /dev/null
+++ b/content/WidgetData/Application/README-fragmentview.txt
@@ -0,0 +1,37 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+Steps to implement FragmentView template:
+-in template-params.xml.ftl:
+ -add the following line to common imports
+ <common src="activities"/>
+
+-Add a Fragment to show behavior. In your MainActivity.java class, it will reference a Fragment
+ called (yourProjectName)Fragment.java. Create that file in your project, using the "main" source
+ folder instead of "common" or "templates".
+ For instance, if your package name is com.example.foo, create the file
+ src/main/java/com/example/foo/FooFragment.java
+
+
+-Within this fragment, make sure that the onCreate method has the line
+ "setHasOptionsMenu(true);", to enable the fragment to handle menu events.
+
+-In order to override menu events, override onOptionsItemSelected.
+
+-refer to sampleSamples/fragmentViewSample for a reference implementation of a
+project built on this template.
+
+
diff --git a/media/MediaEffects/MediaEffectsSample/proguard-project.txt b/content/WidgetData/Application/proguard-project.txt
index 0d8f171..0d8f171 100644
--- a/media/MediaEffects/MediaEffectsSample/proguard-project.txt
+++ b/content/WidgetData/Application/proguard-project.txt
diff --git a/content/WidgetData/Application/src/main/AndroidManifest.xml b/content/WidgetData/Application/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..1c5fb74
--- /dev/null
+++ b/content/WidgetData/Application/src/main/AndroidManifest.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.android.widgetdata"
+ android:versionCode="1"
+ android:versionName="1.0">
+
+ <uses-sdk android:minSdkVersion="4"
+ android:targetSdkVersion="20" />
+
+ <application android:allowBackup="true"
+ android:label="@string/app_name"
+ android:icon="@drawable/ic_launcher"
+ android:theme="@style/AppTheme">
+
+ <!-- The widget provider -->
+ <receiver android:name="WeatherWidgetProvider">
+ <intent-filter>
+ <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
+ </intent-filter>
+ <!-- This specifies the widget provider info -->
+ <meta-data android:name="android.appwidget.provider"
+ android:resource="@xml/widgetinfo" />
+ </receiver>
+
+ <!-- The service serving the RemoteViews to the collection widget -->
+ <service android:name="WeatherWidgetService"
+ android:permission="android.permission.BIND_REMOTEVIEWS"
+ android:exported="false" />
+
+ <!-- The content provider serving the (fake) weather data -->
+ <provider android:name="WeatherDataProvider"
+ android:authorities="com.example.android.widgetdata.provider" android:exported="true" />
+
+ <activity android:name=".MainActivity"
+ android:label="@string/app_name">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+
+</manifest>
diff --git a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java
new file mode 100644
index 0000000..2508f01
--- /dev/null
+++ b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.widgetdata;
+
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.net.Uri;
+
+import java.util.ArrayList;
+
+/**
+ * A dummy class that we are going to use internally to store weather data. Generally, this data
+ * will be stored in an external and persistent location (ie. File, Database, SharedPreferences) so
+ * that the data can persist if the process is ever killed. For simplicity, in this sample the
+ * data will only be stored in memory.
+ */
+class WeatherDataPoint {
+ String day;
+ int degrees;
+
+ WeatherDataPoint(String d, int deg) {
+ day = d;
+ degrees = deg;
+ }
+}
+
+/**
+ * The AppWidgetProvider for our sample weather widget.
+ */
+public class WeatherDataProvider extends ContentProvider {
+ public static final Uri CONTENT_URI =
+ Uri.parse("content://com.example.android.widgetdata.provider");
+ public static class Columns {
+ public static final String ID = "_id";
+ public static final String DAY = "day";
+ public static final String TEMPERATURE = "temperature";
+ }
+
+ /**
+ * Generally, this data will be stored in an external and persistent location (ie. File,
+ * Database, SharedPreferences) so that the data can persist if the process is ever killed.
+ * For simplicity, in this sample the data will only be stored in memory.
+ */
+ private static final ArrayList<WeatherDataPoint> sData = new ArrayList<WeatherDataPoint>();
+
+ @Override
+ public boolean onCreate() {
+ // We are going to initialize the data provider with some default values
+ sData.add(new WeatherDataPoint("Monday", 13));
+ sData.add(new WeatherDataPoint("Tuesday", 1));
+ sData.add(new WeatherDataPoint("Wednesday", 7));
+ sData.add(new WeatherDataPoint("Thursday", 4));
+ sData.add(new WeatherDataPoint("Friday", 22));
+ sData.add(new WeatherDataPoint("Saturday", -10));
+ sData.add(new WeatherDataPoint("Sunday", -13));
+ sData.add(new WeatherDataPoint("Monday", 8));
+ sData.add(new WeatherDataPoint("Tuesday", 11));
+ sData.add(new WeatherDataPoint("Wednesday", -1));
+ sData.add(new WeatherDataPoint("Thursday", 27));
+ sData.add(new WeatherDataPoint("Friday", 27));
+ sData.add(new WeatherDataPoint("Saturday", 27));
+ sData.add(new WeatherDataPoint("Sunday", 27));
+ return true;
+ }
+
+ @Override
+ public synchronized Cursor query(Uri uri, String[] projection, String selection,
+ String[] selectionArgs, String sortOrder) {
+ assert(uri.getPathSegments().isEmpty());
+
+ // In this sample, we only query without any parameters, so we can just return a cursor to
+ // all the weather data.
+ final MatrixCursor c = new MatrixCursor(
+ new String[]{ Columns.ID, Columns.DAY, Columns.TEMPERATURE });
+ for (int i = 0; i < sData.size(); ++i) {
+ final WeatherDataPoint data = sData.get(i);
+ c.addRow(new Object[]{ new Integer(i), data.day, new Integer(data.degrees) });
+ }
+ return c;
+ }
+
+ @Override
+ public String getType(Uri uri) {
+ return "vnd.android.cursor.dir/vnd.widgetdata.temperature";
+ }
+
+ @Override
+ public Uri insert(Uri uri, ContentValues values) {
+ // This example code does not support inserting
+ return null;
+ }
+
+ @Override
+ public int delete(Uri uri, String selection, String[] selectionArgs) {
+ // This example code does not support deleting
+ return 0;
+ }
+
+ @Override
+ public synchronized int update(Uri uri, ContentValues values, String selection,
+ String[] selectionArgs) {
+ assert(uri.getPathSegments().size() == 1);
+
+ // In this sample, we only update the content provider individually for each row with new
+ // temperature values.
+ final int index = Integer.parseInt(uri.getPathSegments().get(0));
+ final MatrixCursor c = new MatrixCursor(
+ new String[]{ Columns.ID, Columns.DAY, Columns.TEMPERATURE });
+ assert(0 <= index && index < sData.size());
+ final WeatherDataPoint data = sData.get(index);
+ data.degrees = values.getAsInteger(Columns.TEMPERATURE);
+
+ // Notify any listeners that the data backing the content provider has changed, and return
+ // the number of rows affected.
+ getContext().getContentResolver().notifyChange(uri, null);
+ return 1;
+ }
+
+}
diff --git a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetProvider.java b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetProvider.java
new file mode 100644
index 0000000..cd80148
--- /dev/null
+++ b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetProvider.java
@@ -0,0 +1,234 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.widgetdata;
+
+import android.app.PendingIntent;
+import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProvider;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ComponentName;
+import android.content.ContentValues;
+import android.content.ContentResolver;
+import android.content.ContentUris;
+import android.database.Cursor;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.widget.RemoteViews;
+import android.widget.Toast;
+
+import java.util.Random;
+
+/**
+ * Our data observer just notifies an update for all weather widgets when it detects a change.
+ */
+class WeatherDataProviderObserver extends ContentObserver {
+ private AppWidgetManager mAppWidgetManager;
+ private ComponentName mComponentName;
+
+ WeatherDataProviderObserver(AppWidgetManager mgr, ComponentName cn, Handler h) {
+ super(h);
+ mAppWidgetManager = mgr;
+ mComponentName = cn;
+ }
+
+ @Override
+ public void onChange(boolean selfChange) {
+ // The data has changed, so notify the widget that the collection view needs to be updated.
+ // In response, the factory's onDataSetChanged() will be called which will requery the
+ // cursor for the new data.
+ mAppWidgetManager.notifyAppWidgetViewDataChanged(
+ mAppWidgetManager.getAppWidgetIds(mComponentName), R.id.weather_list);
+ }
+}
+
+/**
+ * The weather widget's AppWidgetProvider.
+ */
+public class WeatherWidgetProvider extends AppWidgetProvider {
+ public static String CLICK_ACTION = "com.example.android.widgetdata.CLICK";
+ public static String REFRESH_ACTION = "com.example.android.widgetdata.REFRESH";
+ public static String EXTRA_DAY_ID = "com.example.android.widgetdata.day";
+
+ private static HandlerThread sWorkerThread;
+ private static Handler sWorkerQueue;
+ private static WeatherDataProviderObserver sDataObserver;
+ private static final int sMaxDegrees = 96;
+
+ private boolean mIsLargeLayout = true;
+ private int mHeaderWeatherState = 0;
+
+ public WeatherWidgetProvider() {
+ // Start the worker thread
+ sWorkerThread = new HandlerThread("WeatherWidgetProvider-worker");
+ sWorkerThread.start();
+ sWorkerQueue = new Handler(sWorkerThread.getLooper());
+ }
+
+ // XXX: clear the worker queue if we are destroyed?
+
+ @Override
+ public void onEnabled(Context context) {
+ // Register for external updates to the data to trigger an update of the widget. When using
+ // content providers, the data is often updated via a background service, or in response to
+ // user interaction in the main app. To ensure that the widget always reflects the current
+ // state of the data, we must listen for changes and update ourselves accordingly.
+ final ContentResolver r = context.getContentResolver();
+ if (sDataObserver == null) {
+ final AppWidgetManager mgr = AppWidgetManager.getInstance(context);
+ final ComponentName cn = new ComponentName(context, WeatherWidgetProvider.class);
+ sDataObserver = new WeatherDataProviderObserver(mgr, cn, sWorkerQueue);
+ r.registerContentObserver(WeatherDataProvider.CONTENT_URI, true, sDataObserver);
+ }
+ }
+
+ @Override
+ public void onReceive(Context ctx, Intent intent) {
+ final String action = intent.getAction();
+ if (action.equals(REFRESH_ACTION)) {
+ // BroadcastReceivers have a limited amount of time to do work, so for this sample, we
+ // are triggering an update of the data on another thread. In practice, this update
+ // can be triggered from a background service, or perhaps as a result of user actions
+ // inside the main application.
+ final Context context = ctx;
+ sWorkerQueue.removeMessages(0);
+ sWorkerQueue.post(new Runnable() {
+ @Override
+ public void run() {
+ final ContentResolver r = context.getContentResolver();
+ final Cursor c = r.query(WeatherDataProvider.CONTENT_URI, null, null, null,
+ null);
+ final int count = c.getCount();
+
+ // We disable the data changed observer temporarily since each of the updates
+ // will trigger an onChange() in our data observer.
+ r.unregisterContentObserver(sDataObserver);
+ for (int i = 0; i < count; ++i) {
+ final Uri uri = ContentUris.withAppendedId(WeatherDataProvider.CONTENT_URI, i);
+ final ContentValues values = new ContentValues();
+ values.put(WeatherDataProvider.Columns.TEMPERATURE,
+ new Random().nextInt(sMaxDegrees));
+ r.update(uri, values, null, null);
+ }
+ r.registerContentObserver(WeatherDataProvider.CONTENT_URI, true, sDataObserver);
+
+ final AppWidgetManager mgr = AppWidgetManager.getInstance(context);
+ final ComponentName cn = new ComponentName(context, WeatherWidgetProvider.class);
+ mgr.notifyAppWidgetViewDataChanged(mgr.getAppWidgetIds(cn), R.id.weather_list);
+ }
+ });
+
+ final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
+ AppWidgetManager.INVALID_APPWIDGET_ID);
+ } else if (action.equals(CLICK_ACTION)) {
+ // Show a toast
+ final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
+ AppWidgetManager.INVALID_APPWIDGET_ID);
+ final String day = intent.getStringExtra(EXTRA_DAY_ID);
+ final String formatStr = ctx.getResources().getString(R.string.toast_format_string);
+ Toast.makeText(ctx, String.format(formatStr, day), Toast.LENGTH_SHORT).show();
+ }
+
+ super.onReceive(ctx, intent);
+ }
+
+ private RemoteViews buildLayout(Context context, int appWidgetId, boolean largeLayout) {
+ RemoteViews rv;
+ if (largeLayout) {
+ // Specify the service to provide data for the collection widget. Note that we need to
+ // embed the appWidgetId via the data otherwise it will be ignored.
+ final Intent intent = new Intent(context, WeatherWidgetService.class);
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
+ intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));
+ rv = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
+ rv.setRemoteAdapter(appWidgetId, R.id.weather_list, intent);
+
+ // Set the empty view to be displayed if the collection is empty. It must be a sibling
+ // view of the collection view.
+ rv.setEmptyView(R.id.weather_list, R.id.empty_view);
+
+ // Bind a click listener template for the contents of the weather list. Note that we
+ // need to update the intent's data if we set an extra, since the extras will be
+ // ignored otherwise.
+ final Intent onClickIntent = new Intent(context, WeatherWidgetProvider.class);
+ onClickIntent.setAction(WeatherWidgetProvider.CLICK_ACTION);
+ onClickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
+ onClickIntent.setData(Uri.parse(onClickIntent.toUri(Intent.URI_INTENT_SCHEME)));
+ final PendingIntent onClickPendingIntent = PendingIntent.getBroadcast(context, 0,
+ onClickIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+ rv.setPendingIntentTemplate(R.id.weather_list, onClickPendingIntent);
+
+ // Bind the click intent for the refresh button on the widget
+ final Intent refreshIntent = new Intent(context, WeatherWidgetProvider.class);
+ refreshIntent.setAction(WeatherWidgetProvider.REFRESH_ACTION);
+ final PendingIntent refreshPendingIntent = PendingIntent.getBroadcast(context, 0,
+ refreshIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+ rv.setOnClickPendingIntent(R.id.refresh, refreshPendingIntent);
+
+ // Restore the minimal header
+ rv.setTextViewText(R.id.city_name, context.getString(R.string.city_name));
+ } else {
+ rv = new RemoteViews(context.getPackageName(), R.layout.widget_layout_small);
+
+ // Update the header to reflect the weather for "today"
+ Cursor c = context.getContentResolver().query(WeatherDataProvider.CONTENT_URI, null,
+ null, null, null);
+ if (c.moveToPosition(0)) {
+ int tempColIndex = c.getColumnIndex(WeatherDataProvider.Columns.TEMPERATURE);
+ int temp = c.getInt(tempColIndex);
+ String formatStr = context.getResources().getString(R.string.header_format_string);
+ String header = String.format(formatStr, temp,
+ context.getString(R.string.city_name));
+ rv.setTextViewText(R.id.city_name, header);
+ }
+ c.close();
+ }
+ return rv;
+ }
+
+ @Override
+ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
+ // Update each of the widgets with the remote adapter
+ for (int i = 0; i < appWidgetIds.length; ++i) {
+ RemoteViews layout = buildLayout(context, appWidgetIds[i], mIsLargeLayout);
+ appWidgetManager.updateAppWidget(appWidgetIds[i], layout);
+ }
+ super.onUpdate(context, appWidgetManager, appWidgetIds);
+ }
+
+ @Override
+ public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager,
+ int appWidgetId, Bundle newOptions) {
+
+ int minWidth = newOptions.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH);
+ int maxWidth = newOptions.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH);
+ int minHeight = newOptions.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
+ int maxHeight = newOptions.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT);
+
+ RemoteViews layout;
+ if (minHeight < 100) {
+ mIsLargeLayout = false;
+ } else {
+ mIsLargeLayout = true;
+ }
+ layout = buildLayout(context, appWidgetId, mIsLargeLayout);
+ appWidgetManager.updateAppWidget(appWidgetId, layout);
+ }
+}
diff --git a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetService.java b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetService.java
new file mode 100644
index 0000000..b88eb5f
--- /dev/null
+++ b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherWidgetService.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.widgetdata;
+
+import android.appwidget.AppWidgetManager;
+import android.content.Context;
+import android.content.Intent;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.widget.RemoteViews;
+import android.widget.RemoteViewsService;
+
+/**
+ * This is the service that provides the factory to be bound to the collection service.
+ */
+public class WeatherWidgetService extends RemoteViewsService {
+ @Override
+ public RemoteViewsFactory onGetViewFactory(Intent intent) {
+ return new StackRemoteViewsFactory(this.getApplicationContext(), intent);
+ }
+}
+
+/**
+ * This is the factory that will provide data to the collection widget.
+ */
+class StackRemoteViewsFactory implements RemoteViewsService.RemoteViewsFactory {
+ private Context mContext;
+ private Cursor mCursor;
+ private int mAppWidgetId;
+
+ public StackRemoteViewsFactory(Context context, Intent intent) {
+ mContext = context;
+ mAppWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
+ AppWidgetManager.INVALID_APPWIDGET_ID);
+ }
+
+ public void onCreate() {
+ // Since we reload the cursor in onDataSetChanged() which gets called immediately after
+ // onCreate(), we do nothing here.
+ }
+
+ public void onDestroy() {
+ if (mCursor != null) {
+ mCursor.close();
+ }
+ }
+
+ public int getCount() {
+ return mCursor.getCount();
+ }
+
+ public RemoteViews getViewAt(int position) {
+ // Get the data for this position from the content provider
+ String day = "Unknown Day";
+ int temp = 0;
+ if (mCursor.moveToPosition(position)) {
+ final int dayColIndex = mCursor.getColumnIndex(WeatherDataProvider.Columns.DAY);
+ final int tempColIndex = mCursor.getColumnIndex(
+ WeatherDataProvider.Columns.TEMPERATURE);
+ day = mCursor.getString(dayColIndex);
+ temp = mCursor.getInt(tempColIndex);
+ }
+
+ // Return a proper item with the proper day and temperature
+ final String formatStr = mContext.getResources().getString(R.string.item_format_string);
+ final int itemId = R.layout.widget_item;
+ RemoteViews rv = new RemoteViews(mContext.getPackageName(), itemId);
+ rv.setTextViewText(R.id.widget_item, String.format(formatStr, temp, day));
+
+ // Set the click intent so that we can handle it and show a toast message
+ final Intent fillInIntent = new Intent();
+ final Bundle extras = new Bundle();
+ extras.putString(WeatherWidgetProvider.EXTRA_DAY_ID, day);
+ fillInIntent.putExtras(extras);
+ rv.setOnClickFillInIntent(R.id.widget_item, fillInIntent);
+
+ return rv;
+ }
+ public RemoteViews getLoadingView() {
+ // We aren't going to return a default loading view in this sample
+ return null;
+ }
+
+ public int getViewTypeCount() {
+ // Technically, we have two types of views (the dark and light background views)
+ return 2;
+ }
+
+ public long getItemId(int position) {
+ return position;
+ }
+
+ public boolean hasStableIds() {
+ return true;
+ }
+
+ public void onDataSetChanged() {
+ // Refresh the cursor
+ if (mCursor != null) {
+ mCursor.close();
+ }
+ mCursor = mContext.getContentResolver().query(WeatherDataProvider.CONTENT_URI, null, null,
+ null, null);
+ }
+}
diff --git a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java
new file mode 100644
index 0000000..b7500a9
--- /dev/null
+++ b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java
@@ -0,0 +1,19 @@
+package com.example.android.widgetdata;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A Dummy Fragment that shows the intro text from a layout.
+ */
+public class WidgetDataFragment extends Fragment {
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment, null);
+ }
+}
diff --git a/content/WidgetData/Application/src/main/res/drawable-hdpi/ic_launcher.png b/content/WidgetData/Application/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..a602e84
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/drawable-hdpi/sunny.png b/content/WidgetData/Application/src/main/res/drawable-hdpi/sunny.png
new file mode 100644
index 0000000..42785b9
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-hdpi/sunny.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/drawable-mdpi/ic_launcher.png b/content/WidgetData/Application/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c828af2
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/drawable-mdpi/sunny.png b/content/WidgetData/Application/src/main/res/drawable-mdpi/sunny.png
new file mode 100644
index 0000000..9453447
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-mdpi/sunny.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/drawable-nodpi/preview.png b/content/WidgetData/Application/src/main/res/drawable-nodpi/preview.png
new file mode 100644
index 0000000..b9c8780
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-nodpi/preview.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/content/WidgetData/Application/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..b8911f9
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/WidgetData/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..042438f
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/content/WidgetData/Application/src/main/res/layout/fragment.xml b/content/WidgetData/Application/src/main/res/layout/fragment.xml
new file mode 100644
index 0000000..9281e3a
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/layout/fragment.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Copyright 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/vertical_page_margin"
+ android:layout_marginLeft="@dimen/horizontal_page_margin"
+ android:layout_marginRight="@dimen/horizontal_page_margin"
+ android:layout_marginTop="@dimen/vertical_page_margin"
+ android:text="@string/usage" />
+
+</ScrollView> \ No newline at end of file
diff --git a/content/WidgetData/Application/src/main/res/layout/widget_item.xml b/content/WidgetData/Application/src/main/res/layout/widget_item.xml
new file mode 100644
index 0000000..bd3b3f5
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/layout/widget_item.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/widget_item"
+ android:layout_width="match_parent"
+ android:layout_height="46dp"
+ android:background="#F0F0F0"
+ android:gravity="center_vertical"
+ android:paddingLeft="25dp"
+ android:textColor="#232323"
+ android:textSize="20sp" />
diff --git a/content/WidgetData/Application/src/main/res/layout/widget_layout.xml b/content/WidgetData/Application/src/main/res/layout/widget_layout.xml
new file mode 100644
index 0000000..8aca749
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/layout/widget_layout.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginBottom="@dimen/widget_margin_bottom"
+ android:layout_marginLeft="@dimen/widget_margin_left"
+ android:layout_marginRight="@dimen/widget_margin_right"
+ android:layout_marginTop="@dimen/widget_margin_top"
+ android:orientation="vertical">
+ <!-- We define separate margins to allow for flexibility in twiddling the margins
+ depending on device form factor and target SDK version. -->
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:background="#F8F8F8"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/city_weather"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:adjustViewBounds="true"
+ android:padding="12dp"
+ android:scaleType="fitStart"
+ android:src="@drawable/sunny" />
+
+ <TextView
+ android:id="@+id/city_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/city_name"
+ android:textAllCaps="true"
+ android:textColor="#232323"
+ android:textSize="24sp" />
+ </LinearLayout>
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:background="#F8F8F8">
+
+ <ListView
+ android:id="@+id/weather_list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <TextView
+ android:id="@+id/empty_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:text="@string/empty_view_text"
+ android:textColor="#ffffff"
+ android:textSize="20sp"
+ android:visibility="gone" />
+ </FrameLayout>
+
+ <Button
+ android:id="@+id/refresh"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="#F8F8F8"
+ android:gravity="center"
+ android:padding="12dp"
+ android:text="@string/refresh"
+ android:textAllCaps="true"
+ android:textColor="#232323"
+ android:textSize="14sp" />
+</LinearLayout>
diff --git a/content/WidgetData/Application/src/main/res/layout/widget_layout_small.xml b/content/WidgetData/Application/src/main/res/layout/widget_layout_small.xml
new file mode 100644
index 0000000..40fff69
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/layout/widget_layout_small.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginBottom="@dimen/widget_margin_bottom"
+ android:layout_marginLeft="@dimen/widget_margin_left"
+ android:layout_marginRight="@dimen/widget_margin_right"
+ android:layout_marginTop="@dimen/widget_margin_top"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:background="#F8F8F8"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/city_weather"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:adjustViewBounds="true"
+ android:padding="12dp"
+ android:scaleType="fitStart"
+ android:src="@drawable/sunny" />
+
+ <TextView
+ android:id="@+id/city_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/city_name"
+ android:textAllCaps="true"
+ android:textColor="#232323"
+ android:textSize="24sp" />
+ </LinearLayout>
+</LinearLayout>
diff --git a/content/WidgetData/Application/src/main/res/values-v14/dimens.xml b/content/WidgetData/Application/src/main/res/values-v14/dimens.xml
new file mode 100644
index 0000000..8b5494e
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/values-v14/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <dimen name="widget_margin_top">0dp</dimen>
+ <dimen name="widget_margin_bottom">0dp</dimen>
+ <dimen name="widget_margin_left">0dp</dimen>
+ <dimen name="widget_margin_right">0dp</dimen>
+</resources>
diff --git a/content/WidgetData/Application/src/main/res/values/dimens.xml b/content/WidgetData/Application/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..00257a9
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/values/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <dimen name="widget_margin_top">8dp</dimen>
+ <dimen name="widget_margin_bottom">8dp</dimen>
+ <dimen name="widget_margin_left">8dp</dimen>
+ <dimen name="widget_margin_right">8dp</dimen>
+</resources> \ No newline at end of file
diff --git a/content/WidgetData/Application/src/main/res/values/strings.xml b/content/WidgetData/Application/src/main/res/values/strings.xml
new file mode 100644
index 0000000..00fbb9a
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/values/strings.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <string name="empty_view_text">No cities found...</string>
+ <string name="toast_format_string">%1$s!</string>
+ <string name="item_format_string">%1$d\u00B0 on %2$s</string>
+ <string name="header_format_string">%1$d\u00B0 in %2$s</string>
+
+ <string name="refresh">Refresh</string>
+ <string name="city_name">San Francisco</string>
+ <string name="usage">Add the widget named <b>Widget Data</b> to your home screen to use this sample.</string>
+</resources>
diff --git a/content/WidgetData/Application/src/main/res/xml/widgetinfo.xml b/content/WidgetData/Application/src/main/res/xml/widgetinfo.xml
new file mode 100644
index 0000000..2e41943
--- /dev/null
+++ b/content/WidgetData/Application/src/main/res/xml/widgetinfo.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<appwidget-provider
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minWidth="280dp"
+ android:minHeight="180dp"
+ android:updatePeriodMillis="1800000"
+ android:initialLayout="@layout/widget_layout"
+ android:resizeMode="vertical"
+ android:minResizeWidth="280dp"
+ android:minResizeHeight="70dp"
+ android:previewImage="@drawable/preview">
+</appwidget-provider>
diff --git a/content/WidgetData/Application/tests/AndroidManifest.xml b/content/WidgetData/Application/tests/AndroidManifest.xml
new file mode 100644
index 0000000..2ba50ad
--- /dev/null
+++ b/content/WidgetData/Application/tests/AndroidManifest.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.android.listwidget.tests"
+ android:versionCode="1"
+ android:versionName="1.0">
+
+ <uses-sdk
+ android:minSdkVersion="18"
+ android:targetSdkVersion="19" />
+
+ <!-- We add an application tag here just so that we can indicate that
+ this package needs to link against the android.test library,
+ which is needed when building test cases. -->
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <!--
+ Specifies the instrumentation test runner used to run the tests.
+ -->
+ <instrumentation
+ android:name="android.test.InstrumentationTestRunner"
+ android:targetPackage="com.example.android.listwidget"
+ android:label="Tests for com.example.android.listwidget" />
+
+</manifest> \ No newline at end of file
diff --git a/content/WidgetData/Application/tests/src/com/example/android/listwidget/tests/SampleTests.java b/content/WidgetData/Application/tests/src/com/example/android/listwidget/tests/SampleTests.java
new file mode 100644
index 0000000..ee8f93a
--- /dev/null
+++ b/content/WidgetData/Application/tests/src/com/example/android/listwidget/tests/SampleTests.java
@@ -0,0 +1,76 @@
+/*
+* Copyright 2013 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+* Copyright (C) 2013 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.example.android.listwidget.tests;
+
+import com.example.android.listwidget.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for listwidget sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+ private MainActivity mTestActivity;
+ private ListwidgetFragment mTestFragment;
+
+ public SampleTests() {
+ super(MainActivity.class);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ // Starts the activity under test using the default Intent with:
+ // action = {@link Intent#ACTION_MAIN}
+ // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+ // All other fields are null or empty.
+ mTestActivity = getActivity();
+ mTestFragment = (ListwidgetFragment)
+ mTestActivity.getSupportFragmentManager().getFragments().get(1);
+ }
+
+ /**
+ * Test if the test fixture has been set up correctly.
+ */
+ public void testPreconditions() {
+ //Try to add a message to add context to your assertions. These messages will be shown if
+ //a tests fails and make it easy to understand why a test failed
+ assertNotNull("mTestActivity is null", mTestActivity);
+ assertNotNull("mTestFragment is null", mTestFragment);
+ }
+
+ /**
+ * Add more tests below.
+ */
+
+} \ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/LICENSE b/content/WidgetData/LICENSE
index 1af981f..1af981f 100644
--- a/ui/notifications/BasicNotifications/LICENSE
+++ b/content/WidgetData/LICENSE
diff --git a/content/WidgetData/README.md b/content/WidgetData/README.md
new file mode 100644
index 0000000..cdba710
--- /dev/null
+++ b/content/WidgetData/README.md
@@ -0,0 +1,67 @@
+Android WidgetData Sample
+===================================
+
+Sample demonstrating how to instantiate an ActionBar on Android, define
+action items, and set an "up" navigation link. Uses the Support Library
+for compatibility with pre-3.0 devices.
+
+Introduction
+------------
+
+Long intro here.
+
+Multi-paragraph introduction to sample, from an educational point-of-view.
+*Makrdown* formatting allowed. See [Markdown Documentation][1]
+for details.
+
+[1]: http://daringfireball.net/projects/markdown/syntax
+
+Pre-requisites
+--------------
+
+- Android SDK v21
+- Android Build Tools v21.1.1
+- Android Support Repository
+
+Screenshots
+-------------
+
+<img src="screenshots/1-main.png" height="400" alt="Screenshot"/> <img src="screenshots/2-settings.png" height="400" alt="Screenshot"/>
+
+Getting Started
+---------------
+
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command or use "Import Project" in Android Studio.
+
+Support
+-------
+
+- Google+ Community: https://plus.google.com/communities/105153134372062985968
+- Stack Overflow: http://stackoverflow.com/questions/tagged/android
+
+If you've found an error in this sample, please file an issue:
+https://github.com/googlesamples/android-WidgetData
+
+Patches are encouraged, and may be submitted by forking this project and
+submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
+
+License
+-------
+
+Copyright 2014 The Android Open Source Project, Inc.
+
+Licensed to the Apache Software Foundation (ASF) under one or more contributor
+license agreements. See the NOTICE file distributed with this work for
+additional information regarding copyright ownership. The ASF licenses this
+file to you under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
diff --git a/content/WidgetData/build.gradle b/content/WidgetData/build.gradle
new file mode 100644
index 0000000..2b8d1ef
--- /dev/null
+++ b/content/WidgetData/build.gradle
@@ -0,0 +1,11 @@
+
+// BEGIN_EXCLUDE
+import com.example.android.samples.build.SampleGenPlugin
+apply plugin: SampleGenPlugin
+
+samplegen {
+ pathToBuild "../../../../build"
+ pathToSamplesCommon "../../common"
+}
+apply from: "../../../../build/build.gradle"
+// END_EXCLUDE
diff --git a/content/WidgetData/buildSrc/build.gradle b/content/WidgetData/buildSrc/build.gradle
new file mode 100644
index 0000000..8c294c2
--- /dev/null
+++ b/content/WidgetData/buildSrc/build.gradle
@@ -0,0 +1,15 @@
+repositories {
+ mavenCentral()
+}
+dependencies {
+ compile 'org.freemarker:freemarker:2.3.20'
+}
+
+sourceSets {
+ main {
+ groovy {
+ srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+ }
+ }
+}
+
diff --git a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.jar b/content/WidgetData/gradle/wrapper/gradle-wrapper.jar
index 8c0fb64..8c0fb64 100644
--- a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.jar
+++ b/content/WidgetData/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/content/WidgetData/gradle/wrapper/gradle-wrapper.properties b/content/WidgetData/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..fe55261
--- /dev/null
+++ b/content/WidgetData/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Jan 07 17:32:06 EST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/ui/notifications/BasicNotifications/gradlew b/content/WidgetData/gradlew
index 91a7e26..91a7e26 100755
--- a/ui/notifications/BasicNotifications/gradlew
+++ b/content/WidgetData/gradlew
diff --git a/ui/notifications/BasicNotifications/gradlew.bat b/content/WidgetData/gradlew.bat
index aec9973..aec9973 100644
--- a/ui/notifications/BasicNotifications/gradlew.bat
+++ b/content/WidgetData/gradlew.bat
diff --git a/content/WidgetData/screenshots/1-widget.png b/content/WidgetData/screenshots/1-widget.png
new file mode 100644
index 0000000..3d2b8d3
--- /dev/null
+++ b/content/WidgetData/screenshots/1-widget.png
Binary files differ
diff --git a/content/WidgetData/screenshots/icon-web.png b/content/WidgetData/screenshots/icon-web.png
new file mode 100644
index 0000000..8a9d0bd
--- /dev/null
+++ b/content/WidgetData/screenshots/icon-web.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/settings.gradle b/content/WidgetData/settings.gradle
index 9464a35..9464a35 100644
--- a/ui/notifications/BasicNotifications/settings.gradle
+++ b/content/WidgetData/settings.gradle
diff --git a/content/WidgetData/template-params.xml b/content/WidgetData/template-params.xml
new file mode 100644
index 0000000..552f3a2
--- /dev/null
+++ b/content/WidgetData/template-params.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<sample>
+ <name>WidgetData</name>
+ <group>Content</group>
+ <package>com.example.android.widgetdata</package>
+
+ <!-- change minSdk if needed-->
+ <minSdk>11</minSdk>
+
+ <strings>
+ <intro>
+ <![CDATA[
+ This sample demonstrates how to create a list-based widget specifically backed by a
+ content provider.\n\n
+This sample uses a collection view (a ListView) to present some mock weather data in a widget.
+In particular, we will be using a content provider to demonstrate how the widget can retrieve data
+and update itself when you are using more complex data sources.
+When working with external data, or data which must be fetched over high latency, it is important
+to keep the data cached in a persistent location so that the widget feels responsive.
+ ]]>
+ </intro>
+ </strings>
+
+ <template src="base" />
+ <template src="FragmentView" />
+ <common src="activities"/>
+ <common src="logger" />
+
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Content</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>INTERMEDIATE</level>
+ <icon>screenshots/icon-web.png</icon>
+ <screenshots>
+ <img>screenshots/1-widget.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.widget.RemoteViews</android>
+ <android>android.widget.RemoteViewsService</android>
+ <android>android.database.ContentObserver</android>
+ <android>android.content.ContentResolver</android>
+ </api_refs>
+ <description>
+<![CDATA[
+This sample demonstrates how to create a list-based widget specifically backed
+by a content provider.
+]]>
+ </description>
+ <intro>
+<![CDATA[
+This sample uses a collection view (a ListView) to present some mock weather data in a widget.
+In particular, we will be using a content provider to demonstrate how the widget can retrieve data
+and update itself when you are using more complex data sources.
+When working with external data, or data which must be fetched over high latency, it is important
+to keep the data cached in a persistent location so that the widget feels responsive.
+
+We define a [ContentProvider][1] that handles queries from a [RemoteView][2] [ListView][3] widget.
+A [ContentObserver][4] notifies the widget when data changes in the ContentProvider.
+Data for the widget is provided by a [RemoteViewsService][5] that populates a RemoteView collection (the ListView).
+
+[1]: http://developer.android.com/reference/android/content/ContentProvider.html
+[2]: http://developer.android.com/reference/android/widget/RemoteViews.RemoteView.html
+[3]: http://developer.android.com/reference/android/widget/ListView.html
+[4]: http://developer.android.com/reference/android/database/ContentObserver.html
+[5]: http://developer.android.com/reference/android/widget/RemoteViewsService.html
+]]>
+ </intro>
+</metadata>
+</sample>
diff --git a/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties b/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
index 96bdeaf..542898d 100644
--- a/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
+++ b/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
@@ -4,4 +4,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/content/contacts/BasicContactables/screenshots/1-main.png b/content/contacts/BasicContactables/screenshots/1-main.png
new file mode 100644
index 0000000..2c11a7d
--- /dev/null
+++ b/content/contacts/BasicContactables/screenshots/1-main.png
Binary files differ
diff --git a/content/contacts/BasicContactables/screenshots/2-search.png b/content/contacts/BasicContactables/screenshots/2-search.png
new file mode 100644
index 0000000..b8b012f
--- /dev/null
+++ b/content/contacts/BasicContactables/screenshots/2-search.png
Binary files differ
diff --git a/content/contacts/BasicContactables/screenshots/3-results.png b/content/contacts/BasicContactables/screenshots/3-results.png
new file mode 100644
index 0000000..48856ce
--- /dev/null
+++ b/content/contacts/BasicContactables/screenshots/3-results.png
Binary files differ
diff --git a/content/contacts/BasicContactables/screenshots/icon-web.png b/content/contacts/BasicContactables/screenshots/icon-web.png
new file mode 100644
index 0000000..8ad9e14
--- /dev/null
+++ b/content/contacts/BasicContactables/screenshots/icon-web.png
Binary files differ
diff --git a/content/contacts/BasicContactables/template-params.xml b/content/contacts/BasicContactables/template-params.xml
index ee2ba11..01274ae 100644
--- a/content/contacts/BasicContactables/template-params.xml
+++ b/content/contacts/BasicContactables/template-params.xml
@@ -38,4 +38,51 @@
<template src="base"/>
<common src="logger"/>
+ <metadata>
+ <status>PUBLISHED</status>
+ <categories>Content</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>INTERMEDIATE</level>
+ <icon>screenshots/icon-web.png</icon>
+ <screenshots>
+ <img>screenshots/1-main.png</img>
+ <img>screenshots/2-search.png</img>
+ <img>screenshots/3-results.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.app.SearchManager</android>
+ <android>android.widget.SearchView</android>
+ <android>android.app.LoaderManager</android>
+ <android>android.content.CursorLoader</android>
+ <android>android.provider.ContactsContract.CommonDataKinds</android>
+ </api_refs>
+
+ <description>
+<![CDATA[
+This sample shows how to search for contacts, displaying a SearchView in the Action Bar for user input and implementing a query Cursor with CommonDataKinds.Contactables.
+]]>
+ </description>
+
+ <intro>
+<![CDATA[
+This sample displays a [SearchView][1] in the Action Bar when the search icon is clicked. It then implements the [LoaderManager.LoaderCallbacks][2] interface to query the contacts table, using a [CursorLoader][3].
+
+For details on how to implement the [SearchView][1], refer to the training guide [Setting up the search interface][4].
+
+For details on how to implement the [LoaderManager.LoaderCallbacks][2] interface, refer to the [Using the LoaderManager Callbacks][5] guide.
+
+For details on how to query the contacts provider, refer to the [Contacts Provider Access][6] guide.
+
+[1]: http://developer.android.com/reference/android/widget/SearchView.html
+[2]: http://developer.android.com/reference/android/app/LoaderManager.LoaderCallbacks.html
+[3]: http://developer.android.com/reference/android/content/CursorLoader.html
+[4]: http://developer.android.com/training/search/setup.html
+[5]: http://developer.android.com/guide/components/loaders.html#callback
+[6]: http://developer.android.com/guide/topics/providers/contacts-provider.html#Access
+]]>
+ </intro>
+ </metadata>
+
</sample>
diff --git a/ui/notifications/BasicNotifications/Application/.gitignore b/content/documentsUi/DirectorySelection/Application/.gitignore
index 6eb878d..6eb878d 100644
--- a/ui/notifications/BasicNotifications/Application/.gitignore
+++ b/content/documentsUi/DirectorySelection/Application/.gitignore
diff --git a/ui/notifications/BasicNotifications/Application/proguard-project.txt b/content/documentsUi/DirectorySelection/Application/proguard-project.txt
index 0d8f171..0d8f171 100644
--- a/ui/notifications/BasicNotifications/Application/proguard-project.txt
+++ b/content/documentsUi/DirectorySelection/Application/proguard-project.txt
diff --git a/content/documentsUi/DirectorySelection/Application/src/main/AndroidManifest.xml b/content/documentsUi/DirectorySelection/Application/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..46cddcf
--- /dev/null
+++ b/content/documentsUi/DirectorySelection/Application/src/main/AndroidManifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.android.directoryselection"
+ android:versionCode="1"
+ android:versionName="1.0">
+
+ <application android:allowBackup="true"
+ android:label="@string/app_name"
+ android:icon="@drawable/ic_launcher"
+ android:theme="@style/AppTheme">
+
+ <activity android:name=".DirectorySelectionActivity"
+ android:label="@string/app_name">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+
+</manifest>
diff --git a/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntry.java b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntry.java
new file mode 100644
index 0000000..04c1c89
--- /dev/null
+++ b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntry.java
@@ -0,0 +1,25 @@
+/*
+* Copyright (C) 2014 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.example.android.directoryselection;
+
+/**
+ * Entity class that represents an directory entry.
+ */
+public class DirectoryEntry {
+ public String fileName;
+ public String mimeType;
+}
diff --git a/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntryAdapter.java b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntryAdapter.java
new file mode 100644
index 0000000..e92c71e
--- /dev/null
+++ b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectoryEntryAdapter.java
@@ -0,0 +1,100 @@
+/*
+* Copyright (C) 2014 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.example.android.directoryselection;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.List;
+
+/**
+ * Provide views to RecyclerView with the directory entries.
+ */
+public class DirectoryEntryAdapter extends RecyclerView.Adapter<DirectoryEntryAdapter.ViewHolder> {
+
+ static final String DIRECTORY_MIME_TYPE = "vnd.android.document/directory";
+ private List<DirectoryEntry> mDirectoryEntries;
+
+ /**
+ * Provide a reference to the type of views that you are using (custom ViewHolder)
+ */
+ public static class ViewHolder extends RecyclerView.ViewHolder {
+ private final TextView mFileName;
+ private final TextView mMimeType;
+ private final ImageView mImageView;
+
+ public ViewHolder(View v) {
+ super(v);
+ mFileName = (TextView) v.findViewById(R.id.textview_filename);
+ mMimeType = (TextView) v.findViewById(R.id.textview_mimetype);
+ mImageView = (ImageView) v.findViewById(R.id.entry_image);
+ }
+
+ public TextView getFileName() {
+ return mFileName;
+ }
+
+ public TextView getMimeType() {
+ return mMimeType;
+ }
+
+ public ImageView getImageView() {
+ return mImageView;
+ }
+ }
+
+ /**
+ * Initialize the directory entries of the Adapter.
+ *
+ * @param directoryEntries an array of {@link DirectoryEntry}.
+ */
+ public DirectoryEntryAdapter(List<DirectoryEntry> directoryEntries) {
+ mDirectoryEntries = directoryEntries;
+ }
+
+ @Override
+ public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
+ View v = LayoutInflater.from(viewGroup.getContext())
+ .inflate(R.layout.directory_item, viewGroup, false);
+ return new ViewHolder(v);
+ }
+
+ @Override
+ public void onBindViewHolder(ViewHolder viewHolder, final int position) {
+ viewHolder.getFileName().setText(mDirectoryEntries.get(position).fileName);
+ viewHolder.getMimeType().setText(mDirectoryEntries.get(position).mimeType);
+
+ if (DIRECTORY_MIME_TYPE.equals(mDirectoryEntries.get(position).mimeType)) {
+ viewHolder.getImageView().setImageResource(R.drawable.ic_folder_grey600_36dp);
+ } else {
+ viewHolder.getImageView().setImageResource(R.drawable.ic_description_grey600_36dp);
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ return mDirectoryEntries.size();
+ }
+
+ public void setDirectoryEntries(List<DirectoryEntry> directoryEntries) {
+ mDirectoryEntries = directoryEntries;
+ }
+}
diff --git a/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionActivity.java b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionActivity.java
new file mode 100644
index 0000000..d27ba72
--- /dev/null
+++ b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionActivity.java
@@ -0,0 +1,37 @@
+/*
+* Copyright 2014 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.example.android.directoryselection;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+
+/**
+ * Launcher Activity for the Directory Selection sample app.
+ */
+public class DirectorySelectionActivity extends FragmentActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_directory_selection);
+ if (savedInstanceState == null) {
+ getSupportFragmentManager().beginTransaction()
+ .add(R.id.container, DirectorySelectionFragment.newInstance())
+ .commit();
+ }
+ }
+}
diff --git a/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionFragment.java b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionFragment.java
new file mode 100644
index 0000000..4af55db
--- /dev/null
+++ b/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionFragment.java
@@ -0,0 +1,231 @@
+/*
+* Copyright 2014 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.example.android.directoryselection;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.ContentResolver;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.DocumentsContract;
+import android.provider.DocumentsContract.Document;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Fragment that demonstrates how to use Directory Selection API.
+ */
+public class DirectorySelectionFragment extends Fragment {
+
+ private static final String TAG = DirectorySelectionFragment.class.getSimpleName();
+
+ public static final int REQUEST_CODE_OPEN_DIRECTORY = 1;
+
+ Uri mCurrentDirectoryUri;
+ TextView mCurrentDirectoryTextView;
+ Button mCreateDirectoryButton;
+ RecyclerView mRecyclerView;
+ DirectoryEntryAdapter mAdapter;
+ RecyclerView.LayoutManager mLayoutManager;
+
+ /**
+ * Use this factory method to create a new instance of
+ * this fragment using the provided parameters.
+ *
+ * @return A new instance of fragment {@link DirectorySelectionFragment}.
+ */
+ public static DirectorySelectionFragment newInstance() {
+ DirectorySelectionFragment fragment = new DirectorySelectionFragment();
+ return fragment;
+ }
+
+ public DirectorySelectionFragment() {
+ // Required empty public constructor
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_directory_selection, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View rootView, Bundle savedInstanceState) {
+ super.onViewCreated(rootView, savedInstanceState);
+
+ rootView.findViewById(R.id.button_open_directory)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
+ startActivityForResult(intent, REQUEST_CODE_OPEN_DIRECTORY);
+ }
+ });
+
+ mCurrentDirectoryTextView = (TextView) rootView
+ .findViewById(R.id.textview_current_directory);
+ mCreateDirectoryButton = (Button) rootView.findViewById(R.id.button_create_directory);
+ mCreateDirectoryButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ final EditText editView = new EditText(getActivity());
+ new AlertDialog.Builder(getActivity())
+ .setTitle(R.string.create_directory)
+ .setView(editView)
+ .setPositiveButton(android.R.string.ok,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int whichButton) {
+ createDirectory(mCurrentDirectoryUri,
+ editView.getText().toString());
+ updateDirectoryEntries(mCurrentDirectoryUri);
+ }
+ })
+ .setNegativeButton(android.R.string.cancel,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int whichButton) {
+ }
+ })
+ .show();
+ }
+ });
+ mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recyclerview_directory_entries);
+ mLayoutManager = new LinearLayoutManager(getActivity());
+ mRecyclerView.setLayoutManager(mLayoutManager);
+ mRecyclerView.scrollToPosition(0);
+ mAdapter = new DirectoryEntryAdapter(new ArrayList<DirectoryEntry>());
+ mRecyclerView.setAdapter(mAdapter);
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (requestCode == REQUEST_CODE_OPEN_DIRECTORY && resultCode == Activity.RESULT_OK) {
+ Log.d(TAG, String.format("Open Directory result Uri : %s", data.getData()));
+ updateDirectoryEntries(data.getData());
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+
+
+ /**
+ * Updates the current directory of the uri passed as an argument and its children directories.
+ * And updates the {@link #mRecyclerView} depending on the contents of the children.
+ *
+ * @param uri The uri of the current directory.
+ */
+ //VisibileForTesting
+ void updateDirectoryEntries(Uri uri) {
+ ContentResolver contentResolver = getActivity().getContentResolver();
+ Uri docUri = DocumentsContract.buildDocumentUriUsingTree(uri,
+ DocumentsContract.getTreeDocumentId(uri));
+ Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree(uri,
+ DocumentsContract.getTreeDocumentId(uri));
+
+ Cursor docCursor = contentResolver.query(docUri, new String[]{
+ Document.COLUMN_DISPLAY_NAME, Document.COLUMN_MIME_TYPE}, null, null, null);
+ try {
+ while (docCursor.moveToNext()) {
+ Log.d(TAG, "found doc =" + docCursor.getString(0) + ", mime=" + docCursor
+ .getString(1));
+ mCurrentDirectoryUri = uri;
+ mCurrentDir