├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── new-issue.md │ └── pull-request.md └── workflows │ ├── build.yaml │ └── conflict.yaml ├── .gitignore ├── .travis.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DEBUG.md ├── ICLA.txt ├── LANGUAGES.md ├── LICENSE ├── Makefile ├── README.md ├── api.properties.sample ├── build.gradle ├── cast ├── README.md ├── amahi_app_icon.png ├── amahi_cast_logo.png ├── amahi_cast_splash.png ├── amahi_cast_watermark.png └── style.css ├── debug.keystore ├── docs ├── Makefile ├── download_states.dot └── download_states_diagram.png ├── fakeApi.properties ├── fakeSigning.properties ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src ├── androidTest └── java │ └── org │ └── amahi │ └── anywhere │ └── activity │ └── AuthenticationActivityTest.java ├── main ├── AndroidManifest.xml ├── assets │ └── .gitignore ├── java │ └── org │ │ └── amahi │ │ └── anywhere │ │ ├── AmahiApplication.java │ │ ├── AmahiModule.java │ │ ├── account │ │ ├── AccountAuthenticatorAppCompatActivity.java │ │ ├── AmahiAccount.java │ │ ├── AmahiAuthenticator.java │ │ └── AmahiAuthenticatorService.java │ │ ├── activity │ │ ├── AuthenticationActivity.java │ │ ├── ExpandedControlsActivity.java │ │ ├── IntroductionActivity.java │ │ ├── NativeVideoActivity.java │ │ ├── NavigationActivity.java │ │ ├── OfflineFilesActivity.java │ │ ├── RecentFilesActivity.java │ │ ├── ServerAppActivity.java │ │ ├── ServerFileAudioActivity.java │ │ ├── ServerFileImageActivity.java │ │ ├── ServerFileVideoActivity.java │ │ ├── ServerFileWebActivity.java │ │ ├── ServerFilesActivity.java │ │ ├── SettingsActivity.java │ │ ├── SplashActivity.java │ │ └── WebViewActivity.java │ │ ├── adapter │ │ ├── AudioFilesAdapter.java │ │ ├── FilesFilterAdapter.java │ │ ├── NavigationDrawerAdapter.java │ │ ├── RecentFilesAdapter.java │ │ ├── ServerAppsAdapter.java │ │ ├── ServerFilesAdapter.java │ │ ├── ServerFilesAudioPageAdapter.java │ │ ├── ServerFilesImagePagerAdapter.java │ │ ├── ServerFilesMetadataAdapter.java │ │ ├── ServerSharesAdapter.java │ │ └── UploadOptionsAdapter.java │ │ ├── bus │ │ ├── AppSelectedEvent.java │ │ ├── AppsSelectedEvent.java │ │ ├── AudioCompletedEvent.java │ │ ├── AudioControlChangeEvent.java │ │ ├── AudioControlNextEvent.java │ │ ├── AudioControlPauseEvent.java │ │ ├── AudioControlPlayEvent.java │ │ ├── AudioControlPlayPauseEvent.java │ │ ├── AudioControlPreviousEvent.java │ │ ├── AudioMetadataRetrievedEvent.java │ │ ├── AudioPreparedEvent.java │ │ ├── AudioStopEvent.java │ │ ├── AuthenticationConnectionFailedEvent.java │ │ ├── AuthenticationFailedEvent.java │ │ ├── AuthenticationSucceedEvent.java │ │ ├── BusEvent.java │ │ ├── BusProvider.java │ │ ├── DialogButtonClickedEvent.java │ │ ├── DownloadProgressEvent.java │ │ ├── FileCopiedEvent.java │ │ ├── FileDownloadFailedEvent.java │ │ ├── FileDownloadedEvent.java │ │ ├── FileFilterOptionClickEvent.java │ │ ├── FileMetadataRetrievedEvent.java │ │ ├── FileMovedEvent.java │ │ ├── FileOpeningEvent.java │ │ ├── FileOptionClickEvent.java │ │ ├── FileSortOptionClickEvent.java │ │ ├── NetworkChangedEvent.java │ │ ├── OfflineCanceledEvent.java │ │ ├── OfflineFileDeleteEvent.java │ │ ├── OfflineFilesSelectedEvent.java │ │ ├── RecentFilesSelectedEvent.java │ │ ├── ServerAppsLoadFailedEvent.java │ │ ├── ServerAppsLoadedEvent.java │ │ ├── ServerConnectedEvent.java │ │ ├── ServerConnectionChangedEvent.java │ │ ├── ServerConnectionDetectedEvent.java │ │ ├── ServerConnectionFailedEvent.java │ │ ├── ServerFileDeleteEvent.java │ │ ├── ServerFileDownloadingEvent.java │ │ ├── ServerFileSharingEvent.java │ │ ├── ServerFileUploadCompleteEvent.java │ │ ├── ServerFileUploadProgressEvent.java │ │ ├── ServerFilesLoadFailedEvent.java │ │ ├── ServerFilesLoadedEvent.java │ │ ├── ServerReconnectEvent.java │ │ ├── ServerRouteLoadFailedEvent.java │ │ ├── ServerRouteLoadedEvent.java │ │ ├── ServerSharesLoadFailedEvent.java │ │ ├── ServerSharesLoadedEvent.java │ │ ├── ServersLoadFailedEvent.java │ │ ├── ServersLoadedEvent.java │ │ ├── SettingsSelectedEvent.java │ │ ├── ShareSelectedEvent.java │ │ ├── SharesSelectedEvent.java │ │ ├── UploadClickEvent.java │ │ └── UploadSettingsOpeningEvent.java │ │ ├── cache │ │ ├── CacheManager.java │ │ ├── CacheModule.java │ │ ├── DiskCache.java │ │ └── MemoryCache.java │ │ ├── db │ │ ├── AppDatabase.java │ │ ├── UploadQueueDb.java │ │ ├── UploadQueueDbHelper.java │ │ ├── daos │ │ │ ├── FileInfoDao.java │ │ │ ├── OfflineFileDao.java │ │ │ ├── PlayedFileDao.java │ │ │ └── RecentFileDao.java │ │ ├── entities │ │ │ ├── FileInfo.java │ │ │ ├── OfflineFile.java │ │ │ ├── PlayedFile.java │ │ │ └── RecentFile.java │ │ └── repositories │ │ │ ├── FileInfoRepository.java │ │ │ ├── OfflineFileRepository.java │ │ │ ├── PlayedFileRepository.java │ │ │ └── RecentFileRepository.java │ │ ├── fragment │ │ ├── AlertDialogFragment.java │ │ ├── AudioControllerFragment.java │ │ ├── AudioListFragment.java │ │ ├── FileFilterOptionsDialogFragment.java │ │ ├── FileOptionsDialogFragment.java │ │ ├── FileSortOptionsDialogFragment.java │ │ ├── GooglePlaySearchFragment.java │ │ ├── NavigationFragment.java │ │ ├── PrepareDialogFragment.java │ │ ├── ProgressDialogFragment.java │ │ ├── ResumeDialogFragment.java │ │ ├── ServerAppsFragment.java │ │ ├── ServerFileAudioFragment.java │ │ ├── ServerFileDownloadingFragment.java │ │ ├── ServerFileImageFragment.java │ │ ├── ServerFilesFragment.java │ │ ├── ServerSharesFragment.java │ │ ├── SettingsFragment.java │ │ ├── UploadBottomSheet.java │ │ └── UploadSettingsFragment.java │ │ ├── job │ │ ├── NetConnectivityJob.java │ │ └── PhotosContentJob.java │ │ ├── model │ │ ├── AudioFile.java │ │ ├── AudioMetadata.java │ │ ├── FileFilterOption.java │ │ ├── FileOption.java │ │ ├── FileSortOption.java │ │ ├── UploadFile.java │ │ └── UploadOption.java │ │ ├── receiver │ │ ├── AudioReceiver.java │ │ ├── CameraReceiver.java │ │ └── NetworkReceiver.java │ │ ├── server │ │ ├── Api.java │ │ ├── ApiAdapter.java │ │ ├── ApiConnection.java │ │ ├── ApiConnectionDetector.java │ │ ├── ApiHeaders.java │ │ ├── ApiModule.java │ │ ├── api │ │ │ ├── AmahiApi.java │ │ │ ├── ProxyApi.java │ │ │ └── ServerApi.java │ │ ├── client │ │ │ ├── AmahiClient.java │ │ │ └── ServerClient.java │ │ ├── model │ │ │ ├── Authentication.java │ │ │ ├── Server.java │ │ │ ├── ServerApp.java │ │ │ ├── ServerFile.java │ │ │ ├── ServerFileMetadata.java │ │ │ ├── ServerRoute.java │ │ │ └── ServerShare.java │ │ └── response │ │ │ ├── AuthenticationResponse.java │ │ │ ├── ServerAppsResponse.java │ │ │ ├── ServerFileDeleteResponse.java │ │ │ ├── ServerFileUploadResponse.java │ │ │ ├── ServerFilesResponse.java │ │ │ ├── ServerRouteResponse.java │ │ │ ├── ServerSharesResponse.java │ │ │ └── ServersResponse.java │ │ ├── service │ │ ├── AudioService.java │ │ ├── DownloadService.java │ │ ├── ServiceNotifier.java │ │ ├── UploadService.java │ │ └── VideoService.java │ │ ├── task │ │ ├── AudioMetadataRetrievingTask.java │ │ ├── FileMetadataRetrievingTask.java │ │ └── ServerConnectionDetectingTask.java │ │ ├── tv │ │ ├── activity │ │ │ ├── IntroActivity.java │ │ │ ├── MainTVActivity.java │ │ │ ├── ServerFileTvActivity.java │ │ │ ├── SettingsActivity.java │ │ │ ├── TVWebViewActivity.java │ │ │ ├── TvPlaybackAudioActivity.java │ │ │ └── TvPlaybackVideoActivity.java │ │ ├── fragment │ │ │ ├── ConnectionFragment.java │ │ │ ├── IntroFragment.java │ │ │ ├── MainTVFragment.java │ │ │ ├── ServerFileTvFragment.java │ │ │ ├── ServerSelectFragment.java │ │ │ ├── SignOutFragment.java │ │ │ ├── ThemeFragment.java │ │ │ ├── TvPlaybackAudioFragment.java │ │ │ └── TvPlaybackVideoFragment.java │ │ └── presenter │ │ │ ├── AudioDetailsDescriptionPresenter.java │ │ │ ├── IconHeaderPresenter.java │ │ │ ├── MainTVPresenter.java │ │ │ ├── SettingsItemPresenter.java │ │ │ └── VideoDetailsDescriptionPresenter.java │ │ ├── util │ │ ├── AmahiLifeCycleCallback.java │ │ ├── Android.java │ │ ├── AppTheme.java │ │ ├── AudioMetadataFormatter.java │ │ ├── BlurBuilder.java │ │ ├── CastOptionsProvider.java │ │ ├── CheckTV.java │ │ ├── Constants.java │ │ ├── CustomEditTextPreference.java │ │ ├── DateTime.java │ │ ├── Downloader.java │ │ ├── FileManager.java │ │ ├── Fragments.java │ │ ├── FullScreenHelper.java │ │ ├── Identifier.java │ │ ├── Intents.java │ │ ├── LocaleHelper.java │ │ ├── MediaNotificationManager.java │ │ ├── Mimes.java │ │ ├── MultiSwipeRefreshLayout.java │ │ ├── NetworkUtils.java │ │ ├── PathUtil.java │ │ ├── Preferences.java │ │ ├── ProgressRequestBody.java │ │ ├── RecyclerItemClickListener.java │ │ ├── RecyclerViewItemClickListener.java │ │ ├── ServerFileClickListener.java │ │ ├── Time.java │ │ ├── UploadManager.java │ │ ├── VideoSwipeGestures.java │ │ └── ViewDirector.java │ │ └── view │ │ ├── ClickableViewPager.java │ │ ├── MediaControls.java │ │ ├── PercentageView.java │ │ ├── SeekView.java │ │ └── TouchImageView.java └── res │ ├── anim │ ├── recycler_list_anim.xml │ ├── recycler_list_item_anim.xml │ ├── slide_down_text.xml │ ├── slide_down_view.xml │ ├── slide_up_text.xml │ └── slide_up_view.xml │ ├── color │ └── text_input_box_stroke.xml │ ├── drawable-hdpi │ ├── bg_shadow_drawer.9.png │ ├── ic_banner.png │ ├── ic_banner_white.png │ ├── ic_launcher.png │ ├── movies.png │ ├── music.png │ ├── network.png │ ├── photos.png │ ├── tick.png │ ├── tv_ic_archive.png │ ├── tv_ic_audio.png │ ├── tv_ic_code.png │ ├── tv_ic_document.png │ ├── tv_ic_folder.png │ ├── tv_ic_generic.png │ ├── tv_ic_images.png │ ├── tv_ic_presentation.png │ ├── tv_ic_spreadsheet.png │ └── tv_ic_video.png │ ├── drawable-nodpi │ ├── ic_app_logo.png │ └── ic_app_logo_shadowless.png │ ├── drawable-notnight-hdpi │ └── ic_banner.png │ ├── drawable-notnight-xhdpi │ └── ic_banner.png │ ├── drawable-notnight-xxhdpi │ └── ic_banner.png │ ├── drawable-notnight │ ├── default_audiotrack.xml │ ├── ic_apps.xml │ ├── ic_close_24dp.xml │ ├── ic_menu_settings.xml │ ├── ic_more_vert.xml │ ├── ic_offline_24dp.xml │ ├── ic_queue_music_24dp.xml │ ├── ic_recent_files_24dp.xml │ ├── ic_right_arrow_24dp.xml │ ├── ic_search.xml │ ├── ic_share_24dp.xml │ ├── ic_shares.xml │ ├── nav_arrow_down.xml │ └── nav_arrow_up.xml │ ├── drawable-xhdpi │ ├── bg_shadow_drawer.9.png │ ├── ic_banner.png │ ├── ic_banner_white.png │ ├── ic_launcher.png │ ├── nav_arrow_down.png │ ├── nav_arrow_up.png │ └── tv_banner.png │ ├── drawable-xxhdpi │ ├── bg_shadow_drawer.9.png │ ├── ic_banner.png │ ├── ic_banner_white.png │ ├── ic_launcher.png │ ├── nav_arrow_down.png │ └── nav_arrow_up.png │ ├── drawable │ ├── default_audiotrack.png │ ├── ic_add.xml │ ├── ic_apps.xml │ ├── ic_brightness.xml │ ├── ic_camera.xml │ ├── ic_cast.xml │ ├── ic_cellular_data.xml │ ├── ic_check.xml │ ├── ic_close_24dp.xml │ ├── ic_cloud_upload.xml │ ├── ic_delete.xml │ ├── ic_delete_dialog.xml │ ├── ic_duplicate_dialog.xml │ ├── ic_error_24dp.xml │ ├── ic_file_archive.xml │ ├── ic_file_audio.xml │ ├── ic_file_code.xml │ ├── ic_file_directory.xml │ ├── ic_file_generic.xml │ ├── ic_file_image.xml │ ├── ic_file_presentation.xml │ ├── ic_file_spreadsheet.xml │ ├── ic_file_text.xml │ ├── ic_file_video.xml │ ├── ic_filter.xml │ ├── ic_info_dialog.xml │ ├── ic_info_outline.xml │ ├── ic_menu_back.xml │ ├── ic_menu_download.xml │ ├── ic_menu_forward.xml │ ├── ic_menu_settings.xml │ ├── ic_menu_share.xml │ ├── ic_more_vert.xml │ ├── ic_offline_24dp.xml │ ├── ic_offline_black_24dp.xml │ ├── ic_pause_36dp.xml │ ├── ic_pause_circle.xml │ ├── ic_play_36dp.xml │ ├── ic_play_circle.xml │ ├── ic_queue_music_24dp.xml │ ├── ic_recent_files_24dp.xml │ ├── ic_right_arrow_24dp.xml │ ├── ic_search.xml │ ├── ic_server.xml │ ├── ic_settings_app_theme.xml │ ├── ic_settings_connection.xml │ ├── ic_settings_feedback.xml │ ├── ic_settings_friend.xml │ ├── ic_settings_intro.xml │ ├── ic_settings_logout.xml │ ├── ic_settings_rate.xml │ ├── ic_settings_translate.xml │ ├── ic_settings_upload_photo.xml │ ├── ic_settings_version.xml │ ├── ic_share.xml │ ├── ic_share_24dp.xml │ ├── ic_shares.xml │ ├── ic_skip_next_36dp.xml │ ├── ic_skip_previous_36dp.xml │ ├── ic_sort.xml │ ├── ic_switch.xml │ ├── ic_upload_location.xml │ ├── ic_volume_up.xml │ ├── nav_arrow_down.png │ ├── nav_arrow_up.png │ ├── percentage_bar.xml │ ├── scrollbar.xml │ ├── splash_page.xml │ └── white_cursor.xml │ ├── layout-land │ ├── fragment_server_file_audio.xml │ ├── fragment_server_files_metadata.xml │ └── layout_authentication.xml │ ├── layout-sw600dp │ ├── activity_authentication.xml │ └── activity_navigation.xml │ ├── layout-v23 │ └── view_server_share_item.xml │ ├── layout │ ├── activity_authentication.xml │ ├── activity_intro.xml │ ├── activity_main_tv.xml │ ├── activity_native_video.xml │ ├── activity_navigation.xml │ ├── activity_offline_files.xml │ ├── activity_recent_files.xml │ ├── activity_server_app.xml │ ├── activity_server_file_audio.xml │ ├── activity_server_file_image.xml │ ├── activity_server_file_tv.xml │ ├── activity_server_file_video.xml │ ├── activity_server_file_web.xml │ ├── activity_server_files.xml │ ├── activity_settings.xml │ ├── activity_tv_audio_playback.xml │ ├── activity_tv_video_playback.xml │ ├── activity_tv_web.xml │ ├── activity_web_view.xml │ ├── bottom_sheet_options.xml │ ├── custom_edittext_preference.xml │ ├── exo_player_control_view.xml │ ├── file_info_dialog.xml │ ├── filefilter_options_bottom_sheet.xml │ ├── filesort_options_bottom_sheet.xml │ ├── fragment_audio_controller.xml │ ├── fragment_audio_list.xml │ ├── fragment_navigation.xml │ ├── fragment_prepare_dialog.xml │ ├── fragment_server_apps.xml │ ├── fragment_server_file_audio.xml │ ├── fragment_server_file_image.xml │ ├── fragment_server_files.xml │ ├── fragment_server_files_metadata.xml │ ├── fragment_server_shares.xml │ ├── layout_authentication.xml │ ├── onboarding_image.xml │ ├── percentage_view.xml │ ├── seek_view.xml │ ├── shares_loading.xml │ ├── subtitles_surface.xml │ ├── tv_header_item.xml │ ├── tv_loading.xml │ ├── upload_bottom_sheet.xml │ ├── upload_list_item.xml │ ├── view_audio_file_item.xml │ ├── view_navigation_item.xml │ ├── view_server_app_item.xml │ ├── view_server_file_item.xml │ ├── view_server_file_metadata_item.xml │ └── view_server_share_item.xml │ ├── menu │ ├── action_bar_audio_files.xml │ ├── action_bar_cast_button.xml │ ├── action_bar_expanded_controller.xml │ ├── action_bar_navigation.xml │ ├── action_bar_server_app.xml │ ├── action_bar_server_file_image.xml │ ├── action_bar_server_files.xml │ ├── action_bar_video_files.xml │ └── action_mode_server_files.xml │ ├── mipmap-anydpi-v26 │ └── ic_launcher.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_foreground.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_foreground.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_foreground.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_foreground.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_foreground.png │ ├── raw │ └── loading_shares.json │ ├── values-bn │ └── strings.xml │ ├── values-de │ └── strings.xml │ ├── values-es │ └── strings.xml │ ├── values-fr │ └── strings.xml │ ├── values-hi │ └── strings.xml │ ├── values-notnight │ └── colors.xml │ ├── values-pa │ └── strings.xml │ ├── values-sw600dp │ └── bools.xml │ ├── values-te │ └── strings.xml │ ├── values-zh │ └── strings.xml │ ├── values │ ├── attrs.xml │ ├── bools.xml │ ├── colors.xml │ ├── dimens.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ └── themes.xml │ └── xml │ ├── authenticator.xml │ ├── file_paths.xml │ ├── searchable.xml │ ├── settings.xml │ └── upload_settings.xml └── test └── java └── org └── amahi └── anywhere └── PermissionTest.java /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | # Change these settings to your own preference 10 | indent_style = space 11 | indent_size = 4 12 | 13 | # It's recommended to keep these unchanged 14 | end_of_line = lf 15 | charset = utf-8 16 | trim_trailing_whitespace = true 17 | insert_final_newline = true 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New issue 3 | about: Create a report to help us improve or add a feature 4 | title: '' 5 | labels: '' 6 | assignees: cpg 7 | 8 | --- 9 | 10 | **Describe the issue** 11 | A clear and concise description of what the bug/feature is. 12 | 13 | **To Reproduce or Feature details** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error or expected behavior 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Smartphone (please complete as much of the following information as possible):** 27 | - Device: [e.g. iPhone6] 28 | - OS: [e.g. iOS8.1] 29 | - Browser [e.g. stock browser, safari] 30 | - Version [e.g. 22] 31 | 32 | **Additional context** 33 | Add any other context about the problem here. 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/pull-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Pull request 3 | about: Describe the purpose of the pull request here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | Fixes #{Issue Number} 11 | 12 | Please Add Screenshots If any UI changes. 13 | 14 | Please Add Summary of what changes were made in this issue and if possible provide links.(Optional) 15 | 16 | Please make sure these boxes are checked before submitting your pull request - thanks! 17 | 18 | - [ ] Apply the `AndroidStyle.xml` style template to your code in Android Studio. 19 | 20 | - [ ] Run the unit tests with `./gradlew check` to make sure you didn't break anything 21 | 22 | - [ ] If you have multiple commits please combine them into one commit by squashing them. 23 | 24 | - [ ] Update the translations in English, French and Spanish for the strings added. 25 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Build Test 2 | 3 | on: [pull_request, push] 4 | 5 | jobs: 6 | testing: 7 | name: Testing 8 | 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Clone Repo 13 | uses: actions/checkout@v1 14 | 15 | - name: Set up JDK 1.8 16 | uses: actions/setup-java@v1 17 | with: 18 | java-version: 1.8 19 | 20 | - name: Install NDK 21 | run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" --sdk_root=${ANDROID_SDK_ROOT} 22 | 23 | # Step 1: Assemble debug apk 24 | - name: Assemble Debug APK 25 | run: ./gradlew assembleDebug 26 | 27 | # TODO: Connect Virtual Device and Run Tests 28 | # Step 2: Assemble debug test apk 29 | # - name: Assemble Debug Test APK 30 | # run: ./gradlew connectedDebugAndroidTest -------------------------------------------------------------------------------- /.github/workflows/conflict.yaml: -------------------------------------------------------------------------------- 1 | name: Conflict Test 2 | 3 | on: 4 | push: 5 | branches: [ master, beta ] 6 | pull_request: 7 | types: [synchronize] 8 | branches: [ master, beta ] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Check if PR contains merge conflict issue 16 | uses: eps1lon/actions-label-merge-conflict@releases/2.x 17 | if: env.LABELING_TOKEN != '' && env.LABELING_TOKEN != null 18 | id: check 19 | with: 20 | dirtyLabel: "conflicting" 21 | repoToken: "${{ secrets.GITHUB_TOKEN }}" 22 | continueOnMissingPermissions: true 23 | commentOnDirty: 'This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.' 24 | commentOnClean: 'Conflicts have been resolved. A maintainer will take a look shortly.' 25 | env: 26 | LABELING_TOKEN: ${{secrets.GITHUB_TOKEN }} 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | .gradle/ 3 | build/ 4 | release/ 5 | 6 | # Android Studio 7 | .idea/ 8 | *.iml 9 | 10 | # Android SDK 11 | local.properties 12 | 13 | # API 14 | api.properties 15 | 16 | # Crashlytics 17 | crashlytics.properties 18 | crashlytics-build.properties 19 | com_crashlytics_export_strings.xml 20 | fabric.properties 21 | 22 | # Key 23 | signing.properties 24 | *.keystore 25 | *.jks 26 | 27 | .DS* 28 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | 3 | jdk: 4 | - oraclejdk8 5 | 6 | env: 7 | global: 8 | - ANDROID_TARGET=android-22 9 | - ANDROID_BUILD_TOOLS_VERSION=30.0.2 10 | - ANDROID_ABI=armeabi-v7a 11 | 12 | before_install: 13 | - yes | sdkmanager "platforms;android-30" 14 | 15 | android: 16 | components: 17 | - tools 18 | - platform-tools 19 | - build-tools-$ANDROID_BUILD_TOOLS_VERSION 20 | - $ANDROID_TARGET 21 | - extra-android-m2repository 22 | - extra-google-m2repository 23 | - sys-img-armeabi-v7a-android-22 24 | licenses: 25 | - .+ 26 | 27 | before_script: 28 | - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI 29 | - emulator -avd test -no-audio -no-window & 30 | - android-wait-for-emulator 31 | - adb shell settings put global window_animation_scale 0 & 32 | - adb shell settings put global transition_animation_scale 0 & 33 | - adb shell settings put global animator_duration_scale 0 & 34 | - adb shell input keyevent 82 & 35 | 36 | script: 37 | - ./gradlew connectedDebugAndroidTest 38 | 39 | notifications: 40 | email: false 41 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Code style and structure 4 | 5 | * Set the Code Style Scheme to `Default` in Android Studio settings. 6 | * Run `Reformat Code` on changed files before committing. 7 | * Please check out the [Code Style for Contributors](https://source.android.com/source/code-style.html) section in AOSP and maintain as much consistency with them as possible. 8 | 9 | ## Getting Started 10 | 11 | 1. Submit an issue describing your proposed change. 12 | 2. Fork the repository on GitHub. 13 | 3. Clone the fork : `git clone https://github.com/your-username/android.git` 14 | 15 | ## Making Changes 16 | 17 | * Create a branch : `git checkout -b branch-name`. Please avoid working directly on the 18 | `master` branch. 19 | * Make commits of logical units. 20 | * Make sure your commit messages are in the proper format. 21 | * Make sure you have added the necessary tests for your changes. 22 | * Run _all_ the tests to assure nothing else was accidentally broken. 23 | 24 | ## Submitting Changes 25 | 26 | * Push your changes to the branch in your fork of the repository. 27 | * Submit a pull request to the repository. 28 | * The contributors look at Pull Requests and review them on a regular basis. 29 | 30 | ## Additional Resources 31 | 32 | * [#amahi IRC channel](http://talk.amahi.org/) 33 | * [Forking Projects](https://guides.github.com/activities/forking/) 34 | * [Proper Git Commit Messages and an Elegant Git History](http://ablogaboutcode.com/2011/03/23/proper-git-commit-messages-and-an-elegant-git-history) 35 | -------------------------------------------------------------------------------- /LANGUAGES.md: -------------------------------------------------------------------------------- 1 | # Adding Language 2 | 3 | ## Generating Translations 4 | 5 | Refer the following Google Sheet (might be out of date) to get a list of all strings which require translations. 6 | https://docs.google.com/spreadsheets/d/1NAl8xWGDRj6MmLHKyESONAAyudOHdFnSbaqF1Pr28sE/edit?usp=sharing 7 | 8 | Use the Sheet and create a xml file for a particular column and corresponding keys. 9 | 10 | ## Adding Support for New Language 11 | 12 | 1. In `strings.xml (en)`, add entries for the new language. For example, for Hindi, add the following lines 13 | ```xml 14 | 15 | Hindi 16 | hi 17 | 18 | ``` 19 | 2. Add `language_hi` key in every strings file, translated into their respective language. For Example, in `strings.xml (hi)` add ```हिंदी 23 | 24 | @string/language_hi 25 | 26 | 27 | 28 | @string/language_hi_key 29 | 30 | 31 | ``` 32 | 4. Create a PR with a reference to the Issue [#548](https://github.com/amahi/android/issues/548) 33 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | debug: 2 | ./gradlew assembleDebug 3 | 4 | release: 5 | ./gradlew assembleRelease 6 | -------------------------------------------------------------------------------- /api.properties.sample: -------------------------------------------------------------------------------- 1 | # Set API information in api.properties. 2 | # This is something to keep private and you obtain it by asking in the Amahi IRC channel or 3 | # send a message to support at Amahi dot org 4 | 5 | url.amahi=https://amahi.org 6 | url.proxy=https://amahi.org 7 | client.id=1234567890 8 | client.secret=abcdefghijklmnopqrstuvwxyz 9 | chromecast.app.id=4F8B3483 10 | -------------------------------------------------------------------------------- /cast/README.md: -------------------------------------------------------------------------------- 1 | # Chromecast styled receiver support files 2 | 3 | URL for hosting the main CSS and images: 4 | 5 | * production: `https://cdn.jsdelivr.net/gh/amahi/android@e845b6f7/cast/style.css` 6 | * development: `https://cdn.jsdelivr.net/gh/amahi/android@master/cast/style.css` 7 | 8 | We had to change from raw.githubusercontent because it sent response with content-type as `text/plain`, however we required it as `text/css` for Chromecast to accept the CSS properly. 9 | -------------------------------------------------------------------------------- /cast/amahi_app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/cast/amahi_app_icon.png -------------------------------------------------------------------------------- /cast/amahi_cast_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/cast/amahi_cast_logo.png -------------------------------------------------------------------------------- /cast/amahi_cast_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/cast/amahi_cast_splash.png -------------------------------------------------------------------------------- /cast/amahi_cast_watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/cast/amahi_cast_watermark.png -------------------------------------------------------------------------------- /cast/style.css: -------------------------------------------------------------------------------- 1 | .logo { 2 | background-image: url(amahi_cast_logo.png); 3 | background-size: auto 10%; 4 | background-color: white; 5 | } 6 | 7 | .progressBar { 8 | background-color: rgb(238, 255, 65); 9 | } 10 | 11 | .splash { 12 | background-image: url(amahi_cast_splash.png); 13 | box-shadow: inset 0 0 0.1em 0.1em #000; 14 | background-color: white; 15 | } 16 | 17 | .watermark { 18 | background-image: url(amahi_cast_watermark.png); 19 | background-size: auto 57px; 20 | } 21 | 22 | .placeholderImage { 23 | background-size: contain; 24 | } 25 | -------------------------------------------------------------------------------- /debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/debug.keystore -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | dot -Tpng -o download_states_diagram.png download_states.dot 3 | -------------------------------------------------------------------------------- /docs/download_states.dot: -------------------------------------------------------------------------------- 1 | digraph download_states { 2 | rankdir=LR; 3 | size="8,5" 4 | node [shape = circle]; 5 | offline_disabled -> downloading [ label = "offline_toggle_on" color=blue]; 6 | downloading -> offline_disabled [ label = "dl_failed" ]; 7 | downloading -> downloaded [ label = "dl_completed" ]; 8 | downloaded -> out_of_date [ label = "hda_updated" ]; 9 | downloaded -> offline_disabled [ label = "local_removed" ]; 10 | downloaded -> downloaded [ label = "remote_removed" ]; 11 | downloading -> offline_disabled [ label = "offline_toggle_off" color=blue]; 12 | downloaded -> offline_disabled [ label = "offline_toggle_off" color=blue]; 13 | out_of_date -> offline_disabled [ label = "offline_toggle_off" color=blue]; 14 | out_of_date -> downloading [ label = "auto_update" ]; 15 | } 16 | -------------------------------------------------------------------------------- /docs/download_states_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/docs/download_states_diagram.png -------------------------------------------------------------------------------- /fakeApi.properties: -------------------------------------------------------------------------------- 1 | # Set API information in api.properties. 2 | # This is something to keep private and you obtain it by asking in the Amahi IRC channel or 3 | # send a message to support at Amahi dot org 4 | # Purpose: This file is required for Tests and Travis checks to pass 5 | 6 | url.amahi=https://amahi.org 7 | url.proxy=https://amahi.org 8 | client.id=1234567890 9 | client.secret=abcdefghijklmnopqrstuvwxyz 10 | chromecast.app.id=CC1AD845 11 | -------------------------------------------------------------------------------- /fakeSigning.properties: -------------------------------------------------------------------------------- 1 | # Set API information in api.properties. 2 | # This is something to keep private and you obtain it by asking in the Amahi IRC channel or 3 | # send a message to support at Amahi dot org 4 | # Purpose: This file is required for Tests and Travis checks to pass 5 | 6 | keystore.file=debug.keystore 7 | keystore.password=android 8 | key.alias=androiddebugkey 9 | key.password=android 10 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | android.enableJetifier=true 2 | android.useAndroidX=true 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Jul 18 05:49:07 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /src/main/assets/.gitignore: -------------------------------------------------------------------------------- 1 | customServers.json -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/account/AmahiAccount.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.account; 21 | 22 | import android.accounts.Account; 23 | 24 | /** 25 | * Amahi account declaration. 26 | */ 27 | public class AmahiAccount extends Account { 28 | public static final String TYPE = "org.amahi"; 29 | 30 | public static final String TYPE_TOKEN = String.format("%s.FULL", TYPE); 31 | 32 | public AmahiAccount(String name) { 33 | super(name, TYPE); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/account/AmahiAuthenticatorService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.account; 21 | 22 | import android.app.Service; 23 | import android.content.Intent; 24 | import android.os.IBinder; 25 | 26 | /** 27 | * Amahi authenticator service. 28 | * Allows {@link android.accounts.AccountManager} to interact with{@link AmahiAuthenticator}. 29 | */ 30 | public class AmahiAuthenticatorService extends Service { 31 | private AmahiAuthenticator authenticator; 32 | 33 | @Override 34 | public void onCreate() { 35 | super.onCreate(); 36 | 37 | authenticator = new AmahiAuthenticator(getApplicationContext()); 38 | } 39 | 40 | @Override 41 | public IBinder onBind(Intent intent) { 42 | return authenticator.getIBinder(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/adapter/ServerFilesAudioPageAdapter.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.adapter; 2 | 3 | import androidx.fragment.app.Fragment; 4 | import androidx.fragment.app.FragmentManager; 5 | import androidx.fragment.app.FragmentStatePagerAdapter; 6 | 7 | import org.amahi.anywhere.server.model.ServerFile; 8 | import org.amahi.anywhere.server.model.ServerShare; 9 | import org.amahi.anywhere.util.Fragments; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Audio files adapter. Maps {@link org.amahi.anywhere.fragment.ServerFileImageFragment} 15 | * for the {@link org.amahi.anywhere.activity.ServerFileAudioActivity}. 16 | */ 17 | 18 | public class ServerFilesAudioPageAdapter extends FragmentStatePagerAdapter { 19 | private final ServerShare share; 20 | private final List files; 21 | 22 | public ServerFilesAudioPageAdapter(FragmentManager fragmentManager, ServerShare share, List files) { 23 | super(fragmentManager); 24 | this.share = share; 25 | this.files = files; 26 | 27 | } 28 | 29 | @Override 30 | public Fragment getItem(int position) { 31 | return Fragments.Builder.buildServerFileAudioFragment(share, files.get(position)); 32 | } 33 | 34 | @Override 35 | public int getCount() { 36 | return files.size(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AppSelectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerApp; 23 | 24 | public class AppSelectedEvent implements BusEvent { 25 | private final ServerApp app; 26 | 27 | public AppSelectedEvent(ServerApp app) { 28 | this.app = app; 29 | } 30 | 31 | public ServerApp getApp() { 32 | return app; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AppsSelectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AppsSelectedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioCompletedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioCompletedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioControlChangeEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | /** 4 | * Created by arihant on 14/3/18. 5 | */ 6 | 7 | public class AudioControlChangeEvent implements BusEvent { 8 | 9 | private final int position; 10 | 11 | public AudioControlChangeEvent(int position) { 12 | this.position = position; 13 | } 14 | 15 | public int getPosition() { 16 | return position; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioControlNextEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioControlNextEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioControlPauseEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioControlPauseEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioControlPlayEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioControlPlayEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioControlPlayPauseEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioControlPlayPauseEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioControlPreviousEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioControlPreviousEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioPreparedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AudioPreparedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AudioStopEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | public class AudioStopEvent implements BusEvent { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AuthenticationConnectionFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AuthenticationConnectionFailedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AuthenticationFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class AuthenticationFailedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/AuthenticationSucceedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.Authentication; 23 | 24 | public class AuthenticationSucceedEvent implements BusEvent { 25 | private final Authentication authentication; 26 | 27 | public AuthenticationSucceedEvent(Authentication authentication) { 28 | this.authentication = authentication; 29 | } 30 | 31 | public Authentication getAuthentication() { 32 | return authentication; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/BusEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | /** 23 | * Base interface for all bus events. Useful for a very basic polymorphism, for example 24 | * to declare a result object of {@link android.os.AsyncTask} not actually knowing which result 25 | * will be produced. 26 | */ 27 | public interface BusEvent { 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/BusProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import com.squareup.otto.Bus; 23 | 24 | /** 25 | * {@link com.squareup.otto.Bus} holder, which allows to use a single instance everywhere. 26 | */ 27 | public final class BusProvider { 28 | private BusProvider() { 29 | } 30 | 31 | public static Bus getBus() { 32 | return BusHolder.BUS; 33 | } 34 | 35 | private static final class BusHolder { 36 | public static final Bus BUS = new Bus(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/DialogButtonClickedEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | import androidx.annotation.IntDef; 4 | 5 | public class DialogButtonClickedEvent implements BusEvent { 6 | public static final int YES = 1; 7 | public static final int NO = 2; 8 | 9 | @Types 10 | private int buttonId; 11 | 12 | public DialogButtonClickedEvent(@Types int buttonId) { 13 | this.buttonId = buttonId; 14 | } 15 | 16 | public int getButtonId() { 17 | return buttonId; 18 | } 19 | 20 | @IntDef({YES, NO}) 21 | public @interface Types { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/DownloadProgressEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class DownloadProgressEvent implements BusEvent { 23 | 24 | private long id; 25 | private int progress; 26 | 27 | public DownloadProgressEvent(long id, int progress) { 28 | this.id = id; 29 | this.progress = progress; 30 | } 31 | 32 | public long getId() { 33 | return id; 34 | } 35 | 36 | public int getProgress() { 37 | return progress; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileCopiedEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | import java.io.File; 4 | 5 | public class FileCopiedEvent implements BusEvent { 6 | private File targetLocation; 7 | 8 | public FileCopiedEvent(File targetLocation) { 9 | this.targetLocation = targetLocation; 10 | } 11 | 12 | public File getTargetLocation() { 13 | return targetLocation; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileDownloadFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class FileDownloadFailedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileDownloadedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import android.net.Uri; 23 | 24 | public class FileDownloadedEvent implements BusEvent { 25 | private final Uri fileUri; 26 | 27 | public FileDownloadedEvent(Uri fileUri) { 28 | this.fileUri = fileUri; 29 | } 30 | 31 | public Uri getFileUri() { 32 | return fileUri; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileFilterOptionClickEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | 4 | import org.amahi.anywhere.model.FileFilterOption; 5 | 6 | public class FileFilterOptionClickEvent { 7 | 8 | @FileFilterOption.Types 9 | private int filterOption; 10 | 11 | public FileFilterOptionClickEvent(@FileFilterOption.Types int filterOption) { 12 | this.filterOption = filterOption; 13 | 14 | } 15 | 16 | @FileFilterOption.Types 17 | public int getFilterOption() { 18 | return filterOption; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileMovedEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | import java.io.File; 4 | 5 | public class FileMovedEvent implements BusEvent{ 6 | private File targetLocation; 7 | 8 | public FileMovedEvent(File targetLocation) { 9 | this.targetLocation = targetLocation; 10 | } 11 | 12 | public File getTargetLocation() { 13 | return targetLocation; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileOptionClickEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | import org.amahi.anywhere.model.FileOption; 4 | import org.amahi.anywhere.server.model.ServerFile; 5 | 6 | public class FileOptionClickEvent { 7 | private int fileOption; 8 | private String uniqueKey; 9 | private ServerFile file; 10 | 11 | public FileOptionClickEvent(@FileOption.Types int fileOption, String uniqueKey) { 12 | this.fileOption = fileOption; 13 | this.uniqueKey = uniqueKey; 14 | } 15 | 16 | public FileOptionClickEvent(@FileOption.Types int fileOption, String uniqueKey, ServerFile file) { 17 | this.fileOption = fileOption; 18 | this.uniqueKey = uniqueKey; 19 | this.file = file; 20 | } 21 | 22 | @FileOption.Types 23 | public int getFileOption() { 24 | return fileOption; 25 | } 26 | 27 | public String getFileUniqueKey() { 28 | return uniqueKey; 29 | } 30 | 31 | public ServerFile getServerFile() { 32 | return file; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/FileSortOptionClickEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | import org.amahi.anywhere.model.FileSortOption; 4 | 5 | public class FileSortOptionClickEvent { 6 | private int sortOption; 7 | 8 | public FileSortOptionClickEvent(@FileSortOption.Types int sortOption) { 9 | this.sortOption = sortOption; 10 | 11 | } 12 | 13 | @FileSortOption.Types 14 | public int getSortOption() { 15 | return sortOption; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/NetworkChangedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class NetworkChangedEvent implements BusEvent { 23 | private final int network; 24 | 25 | public NetworkChangedEvent(int network) { 26 | this.network = network; 27 | } 28 | 29 | public int getNetwork() { 30 | return network; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/OfflineCanceledEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class OfflineCanceledEvent implements BusEvent { 23 | 24 | private long downloadId; 25 | 26 | public OfflineCanceledEvent(long downloadId) { 27 | this.downloadId = downloadId; 28 | } 29 | 30 | public long getDownloadId() { 31 | return downloadId; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/OfflineFileDeleteEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | import org.amahi.anywhere.server.model.ServerFile; 4 | 5 | public class OfflineFileDeleteEvent implements BusEvent { 6 | private ServerFile file; 7 | 8 | public OfflineFileDeleteEvent(ServerFile file) { 9 | this.file = file; 10 | } 11 | 12 | public ServerFile getFile() { 13 | return file; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/OfflineFilesSelectedEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | public class OfflineFilesSelectedEvent implements BusEvent { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/RecentFilesSelectedEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | public class RecentFilesSelectedEvent implements BusEvent { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerAppsLoadFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerAppsLoadFailedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerAppsLoadedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerApp; 23 | 24 | import java.util.List; 25 | 26 | public class ServerAppsLoadedEvent implements BusEvent { 27 | private final List serverApps; 28 | 29 | public ServerAppsLoadedEvent(List serverApps) { 30 | this.serverApps = serverApps; 31 | } 32 | 33 | public List getServerApps() { 34 | return serverApps; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerConnectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.Server; 23 | 24 | public class ServerConnectedEvent implements BusEvent { 25 | public Server server; 26 | 27 | public ServerConnectedEvent(Server server) { 28 | this.server = server; 29 | } 30 | 31 | public Server getServer() { 32 | return server; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerConnectionChangedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerConnectionChangedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerConnectionDetectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerConnectionDetectedEvent implements BusEvent { 23 | private final String serverAddress; 24 | 25 | public ServerConnectionDetectedEvent(String serverAddress) { 26 | this.serverAddress = serverAddress; 27 | } 28 | 29 | public String getServerAddress() { 30 | return serverAddress; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerConnectionFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerConnectionFailedEvent implements BusEvent { 23 | private String errorMessage; 24 | 25 | public ServerConnectionFailedEvent() { 26 | } 27 | 28 | public ServerConnectionFailedEvent(String errorMessage) { 29 | this.errorMessage = errorMessage; 30 | } 31 | 32 | public String getErrorMessage() { 33 | return errorMessage; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFileDeleteEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerFileDeleteEvent implements BusEvent { 23 | private boolean isDeleted; 24 | 25 | public ServerFileDeleteEvent(boolean isDeleted) { 26 | this.isDeleted = isDeleted; 27 | } 28 | 29 | public boolean isDeleted() { 30 | return isDeleted; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFileDownloadingEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerFile; 23 | import org.amahi.anywhere.server.model.ServerShare; 24 | 25 | public class ServerFileDownloadingEvent implements BusEvent { 26 | private final ServerShare share; 27 | private final ServerFile file; 28 | 29 | public ServerFileDownloadingEvent(ServerShare share, ServerFile file) { 30 | this.share = share; 31 | this.file = file; 32 | } 33 | 34 | public ServerShare getShare() { 35 | return share; 36 | } 37 | 38 | public ServerFile getFile() { 39 | return file; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFileSharingEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerFile; 23 | import org.amahi.anywhere.server.model.ServerShare; 24 | 25 | public class ServerFileSharingEvent implements BusEvent { 26 | private final ServerShare share; 27 | private final ServerFile file; 28 | 29 | public ServerFileSharingEvent(ServerShare share, ServerFile file) { 30 | this.share = share; 31 | this.file = file; 32 | } 33 | 34 | public ServerShare getShare() { 35 | return share; 36 | } 37 | 38 | public ServerFile getFile() { 39 | return file; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFileUploadCompleteEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerFileUploadCompleteEvent implements BusEvent { 23 | private int id; 24 | private boolean wasUploadSuccessful; 25 | 26 | public ServerFileUploadCompleteEvent(int id, boolean wasUploadSuccessful) { 27 | this.id = id; 28 | this.wasUploadSuccessful = wasUploadSuccessful; 29 | } 30 | 31 | public int getId() { 32 | return id; 33 | } 34 | 35 | public boolean wasUploadSuccessful() { 36 | return wasUploadSuccessful; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFileUploadProgressEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerFileUploadProgressEvent implements BusEvent { 23 | private int id; 24 | private int progress; 25 | 26 | public ServerFileUploadProgressEvent(int id, int progress) { 27 | this.id = id; 28 | this.progress = progress; 29 | } 30 | 31 | public int getId() { 32 | return this.id; 33 | } 34 | 35 | public int getProgress() { 36 | return this.progress; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFilesLoadFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerFilesLoadFailedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerFilesLoadedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerFile; 23 | 24 | import java.util.List; 25 | 26 | public class ServerFilesLoadedEvent implements BusEvent { 27 | private final List serverFiles; 28 | 29 | public ServerFilesLoadedEvent(List serverFiles) { 30 | this.serverFiles = serverFiles; 31 | } 32 | 33 | public List getServerFiles() { 34 | return serverFiles; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerReconnectEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | public class ServerReconnectEvent implements BusEvent { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerRouteLoadFailedEvent.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.bus; 2 | 3 | public class ServerRouteLoadFailedEvent implements BusEvent { 4 | private String errorMessage; 5 | 6 | public ServerRouteLoadFailedEvent() { 7 | } 8 | 9 | public ServerRouteLoadFailedEvent(String errorMessage) { 10 | this.errorMessage = errorMessage; 11 | } 12 | 13 | public String getErrorMessage() { 14 | return errorMessage; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerRouteLoadedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerRoute; 23 | 24 | public class ServerRouteLoadedEvent implements BusEvent { 25 | private final ServerRoute serverRoute; 26 | 27 | public ServerRouteLoadedEvent(ServerRoute serverRoute) { 28 | this.serverRoute = serverRoute; 29 | } 30 | 31 | public ServerRoute getServerRoute() { 32 | return serverRoute; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerSharesLoadFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServerSharesLoadFailedEvent implements BusEvent { 23 | private String error; 24 | 25 | public ServerSharesLoadFailedEvent() { 26 | } 27 | 28 | public ServerSharesLoadFailedEvent(String error) { 29 | this.error = error; 30 | } 31 | 32 | public String getError() { 33 | return error; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServerSharesLoadedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerShare; 23 | 24 | import java.util.List; 25 | 26 | public class ServerSharesLoadedEvent implements BusEvent { 27 | private final List serverShares; 28 | 29 | public ServerSharesLoadedEvent(List serverShares) { 30 | this.serverShares = serverShares; 31 | } 32 | 33 | public List getServerShares() { 34 | return serverShares; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServersLoadFailedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class ServersLoadFailedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ServersLoadedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.Server; 23 | 24 | import java.util.List; 25 | 26 | public class ServersLoadedEvent implements BusEvent { 27 | private final List servers; 28 | 29 | public ServersLoadedEvent(List servers) { 30 | this.servers = servers; 31 | } 32 | 33 | public List getServers() { 34 | return servers; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/SettingsSelectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class SettingsSelectedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/ShareSelectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.server.model.ServerShare; 23 | 24 | public class ShareSelectedEvent implements BusEvent { 25 | private final ServerShare share; 26 | 27 | public ShareSelectedEvent(ServerShare share) { 28 | this.share = share; 29 | } 30 | 31 | public ServerShare getShare() { 32 | return share; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/SharesSelectedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class SharesSelectedEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/UploadClickEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | import org.amahi.anywhere.model.UploadOption; 23 | 24 | public class UploadClickEvent implements BusEvent { 25 | private int uploadOption; 26 | 27 | public UploadClickEvent(@UploadOption.Types int uploadOption) { 28 | this.uploadOption = uploadOption; 29 | } 30 | 31 | @UploadOption.Types 32 | public int getUploadOption() { 33 | return uploadOption; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/bus/UploadSettingsOpeningEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.bus; 21 | 22 | public class UploadSettingsOpeningEvent implements BusEvent { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/cache/CacheModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.cache; 21 | 22 | import android.content.Context; 23 | 24 | import javax.inject.Singleton; 25 | 26 | import dagger.Module; 27 | import dagger.Provides; 28 | 29 | /** 30 | * Cache dependency injection module. 31 | * Provides Singleton {@link CacheManager} for possible consumers. 32 | */ 33 | @Module( 34 | complete = false, 35 | library = true 36 | ) 37 | public class CacheModule { 38 | @Provides 39 | @Singleton 40 | CacheManager provideCacheManager(Context context) { 41 | return new CacheManager(context); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/UploadQueueDb.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db; 2 | 3 | import android.content.Context; 4 | import android.database.sqlite.SQLiteDatabase; 5 | import android.database.sqlite.SQLiteOpenHelper; 6 | 7 | /** 8 | * SQLite db for maintaining image uploads in a persistent database. 9 | * Query methods managed by {@link UploadQueueDbHelper UploadQueueDbHelper}. 10 | */ 11 | 12 | class UploadQueueDb extends SQLiteOpenHelper { 13 | 14 | // Table name 15 | static final String TABLE_NAME = "UPLOAD_QUEUE_TABLE"; 16 | // column names 17 | static final String KEY_ID = "id"; 18 | static final String KEY_FILE_PATH = "file_path"; 19 | // Database version 20 | private static final int DATABASE_VERSION = 1; 21 | // Database Name 22 | private static final String DATABASE_NAME = "AMAHI_ANYWHERE_DATABASE"; 23 | 24 | UploadQueueDb(Context context) { 25 | super(context, DATABASE_NAME, null, DATABASE_VERSION); 26 | } 27 | 28 | @Override 29 | public void onCreate(SQLiteDatabase db) { 30 | String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + "(" 31 | + KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 32 | + KEY_FILE_PATH + " VARCHAR(200) NOT NULL)"; 33 | 34 | db.execSQL(CREATE_TABLE); 35 | } 36 | 37 | @Override 38 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/daos/FileInfoDao.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.daos; 2 | 3 | 4 | import androidx.room.Dao; 5 | import androidx.room.Insert; 6 | import androidx.room.OnConflictStrategy; 7 | import androidx.room.Query; 8 | import androidx.room.Update; 9 | 10 | import org.amahi.anywhere.db.entities.FileInfo; 11 | 12 | @Dao 13 | public interface FileInfoDao { 14 | @Insert(onConflict = OnConflictStrategy.REPLACE) 15 | void insert(FileInfo fileInfo); 16 | 17 | @Update 18 | void update(FileInfo fileInfo); 19 | 20 | @Query("SELECT * FROM file_info_table where uniqueKey = :uniqueKey") 21 | FileInfo getFileInfo(String uniqueKey); 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/daos/PlayedFileDao.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.daos; 2 | 3 | import androidx.room.Dao; 4 | import androidx.room.Insert; 5 | import androidx.room.OnConflictStrategy; 6 | import androidx.room.Query; 7 | import androidx.room.Update; 8 | 9 | import org.amahi.anywhere.db.entities.PlayedFile; 10 | 11 | @Dao 12 | public interface PlayedFileDao { 13 | 14 | @Insert(onConflict = OnConflictStrategy.REPLACE) 15 | void insert(PlayedFile playedFile); 16 | 17 | @Update 18 | void update(PlayedFile playedFile); 19 | 20 | @Query("DELETE FROM play_file_table") 21 | void deleteAll(); 22 | 23 | @Query("SELECT * from play_file_table where uniqueKey = :uniqueKey") 24 | PlayedFile getPlayedFile(String uniqueKey); 25 | 26 | @Query("DELETE FROM play_file_table where uniqueKey = :uniqueKey") 27 | void delete(String uniqueKey); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/daos/RecentFileDao.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.daos; 2 | 3 | import androidx.room.Dao; 4 | import androidx.room.Insert; 5 | import androidx.room.OnConflictStrategy; 6 | import androidx.room.Query; 7 | import androidx.room.Update; 8 | 9 | import org.amahi.anywhere.db.entities.RecentFile; 10 | 11 | import java.util.List; 12 | 13 | @Dao 14 | public interface RecentFileDao { 15 | 16 | @Insert(onConflict = OnConflictStrategy.REPLACE) 17 | void insert(RecentFile recentFile); 18 | 19 | @Update 20 | void update(RecentFile recentFile); 21 | 22 | @Query("DELETE FROM recent_file_table") 23 | void deleteAll(); 24 | 25 | @Query("DELETE FROM recent_file_table where uniqueKey = :uniqueKey") 26 | void delete(String uniqueKey); 27 | 28 | @Query("SELECT * from recent_file_table where uniqueKey = :uniqueKey") 29 | RecentFile getRecentFile(String uniqueKey); 30 | 31 | @Query("SELECT * from recent_file_table where serverName = :serverName ORDER BY visitTime DESC") 32 | List getRecentFiles(String serverName); 33 | 34 | @Query("SELECT * FROM recent_file_table ORDER BY visitTime DESC LIMIT 1") 35 | RecentFile getLastInsertFile(); 36 | 37 | @Query("SELECT * FROM recent_file_table ORDER BY visitTime ASC LIMIT 1") 38 | RecentFile getOldestFile(); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/entities/FileInfo.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.entities; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.Entity; 5 | import androidx.room.PrimaryKey; 6 | 7 | @Entity(tableName = "file_info_table") 8 | public class FileInfo { 9 | 10 | @PrimaryKey 11 | @NonNull 12 | private String uniqueKey; 13 | 14 | private String lastOpened; 15 | 16 | public FileInfo(String uniqueKey, String lastOpened) { 17 | this.uniqueKey = uniqueKey; 18 | this.lastOpened = lastOpened; 19 | } 20 | 21 | public String getUniqueKey() { 22 | return uniqueKey; 23 | } 24 | 25 | public void setUniqueKey(String uniqueKey) { 26 | this.uniqueKey = uniqueKey; 27 | } 28 | 29 | public String getLastOpened() { 30 | return lastOpened; 31 | } 32 | 33 | public void setLastOpened(String lastOpened) { 34 | this.lastOpened = lastOpened; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/entities/PlayedFile.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.entities; 2 | 3 | import androidx.room.Entity; 4 | import androidx.room.PrimaryKey; 5 | import androidx.annotation.NonNull; 6 | 7 | @Entity(tableName = "play_file_table") 8 | public class PlayedFile { 9 | 10 | @PrimaryKey 11 | @NonNull 12 | private String uniqueKey; 13 | private long position; 14 | 15 | public PlayedFile(String uniqueKey, long position) { 16 | this.uniqueKey = uniqueKey; 17 | this.position = position; 18 | } 19 | 20 | public String getUniqueKey() { 21 | return uniqueKey; 22 | } 23 | 24 | public void setUniqueKey(String uniqueKey) { 25 | this.uniqueKey = uniqueKey; 26 | } 27 | 28 | public long getPosition() { 29 | return position; 30 | } 31 | 32 | public void setPosition(long position) { 33 | this.position = position; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/repositories/FileInfoRepository.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.repositories; 2 | 3 | import android.content.Context; 4 | 5 | import org.amahi.anywhere.db.AppDatabase; 6 | import org.amahi.anywhere.db.daos.FileInfoDao; 7 | import org.amahi.anywhere.db.entities.FileInfo; 8 | 9 | public class FileInfoRepository { 10 | 11 | private FileInfoDao fileInfoDao; 12 | 13 | public FileInfoRepository(Context context) { 14 | AppDatabase db = AppDatabase.getDatabase(context); 15 | fileInfoDao = db.fileInfoDao(); 16 | 17 | } 18 | 19 | public FileInfo getFileInfo(String uniqueKey) { 20 | return fileInfoDao.getFileInfo(uniqueKey); 21 | } 22 | 23 | public void insert(FileInfo fileInfo) { 24 | fileInfoDao.insert(fileInfo); 25 | } 26 | 27 | public void update(FileInfo fileInfo) { 28 | fileInfoDao.update(fileInfo); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/db/repositories/PlayedFileRepository.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.db.repositories; 2 | 3 | import android.content.Context; 4 | 5 | import org.amahi.anywhere.db.AppDatabase; 6 | import org.amahi.anywhere.db.daos.PlayedFileDao; 7 | import org.amahi.anywhere.db.entities.PlayedFile; 8 | 9 | public class PlayedFileRepository { 10 | 11 | private PlayedFileDao mPlayedFileDao; 12 | 13 | public PlayedFileRepository(Context context) { 14 | AppDatabase db = AppDatabase.getDatabase(context); 15 | mPlayedFileDao = db.playedFileDao(); 16 | } 17 | 18 | public PlayedFile getPlayedFile(String uniqueKey) { 19 | return mPlayedFileDao.getPlayedFile(uniqueKey); 20 | } 21 | 22 | public void insert(PlayedFile playedFile) { 23 | mPlayedFileDao.insert(playedFile); 24 | } 25 | 26 | public void update(PlayedFile playedFile) { 27 | mPlayedFileDao.update(playedFile); 28 | } 29 | 30 | public void delete(String uniqueKey) { 31 | mPlayedFileDao.delete(uniqueKey); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/fragment/ProgressDialogFragment.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.fragment; 2 | 3 | import android.app.Dialog; 4 | import android.app.DialogFragment; 5 | import android.app.ProgressDialog; 6 | import android.os.Bundle; 7 | 8 | import org.amahi.anywhere.R; 9 | 10 | /** 11 | * Dialog Fragment appears in uploading files. 12 | */ 13 | 14 | public class ProgressDialogFragment extends DialogFragment { 15 | 16 | private ProgressDialog dialog; 17 | 18 | @Override 19 | public Dialog onCreateDialog(Bundle savedInstanceState) { 20 | dialog = new ProgressDialog(getActivity()); 21 | dialog.setTitle(getString(R.string.message_file_upload_title)); 22 | dialog.setCancelable(false); 23 | dialog.setIndeterminate(false); 24 | dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); 25 | return dialog; 26 | } 27 | 28 | public void setProgress(int progress) { 29 | dialog.setProgress(progress); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/fragment/ResumeDialogFragment.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.fragment; 2 | 3 | import android.app.Dialog; 4 | import android.os.Bundle; 5 | import androidx.annotation.NonNull; 6 | import androidx.fragment.app.DialogFragment; 7 | import androidx.appcompat.app.AlertDialog; 8 | 9 | import org.amahi.anywhere.R; 10 | import org.amahi.anywhere.bus.BusProvider; 11 | import org.amahi.anywhere.bus.DialogButtonClickedEvent; 12 | 13 | public class ResumeDialogFragment extends DialogFragment { 14 | 15 | @NonNull 16 | @Override 17 | public Dialog onCreateDialog(Bundle savedInstanceState) { 18 | 19 | AlertDialog.Builder dialogBuilder = 20 | new AlertDialog.Builder(getActivity()) 21 | .setMessage(getString(R.string.message_resume_last_position)) 22 | .setPositiveButton(R.string.yes, (dialog, which) -> { 23 | BusProvider.getBus().post(new DialogButtonClickedEvent(DialogButtonClickedEvent.YES)); 24 | }) 25 | .setNegativeButton(R.string.no, (dialog, which) -> { 26 | BusProvider.getBus().post(new DialogButtonClickedEvent(DialogButtonClickedEvent.NO)); 27 | }); 28 | 29 | setCancelable(false); 30 | 31 | return dialogBuilder.create(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/model/AudioFile.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.model; 2 | 3 | public class AudioFile { 4 | 5 | private String title; 6 | private String subtitle; 7 | 8 | public String getTitle() { 9 | return title; 10 | } 11 | 12 | public void setTitle(String title) { 13 | this.title = title; 14 | } 15 | 16 | public String getSubtitle() { 17 | return subtitle; 18 | } 19 | 20 | public void setSubtitle(String subtitle) { 21 | this.subtitle = subtitle; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/model/FileFilterOption.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.model; 2 | 3 | import androidx.annotation.IntDef; 4 | 5 | import org.amahi.anywhere.util.Mimes; 6 | 7 | public class FileFilterOption { 8 | 9 | //Specifying positions to be on the Filtering selection dialog 10 | public static final int All = 0; 11 | public static final int DOCS = Mimes.Type.DOCUMENT; 12 | public static final int VID = Mimes.Type.VIDEO; 13 | public static final int AUD = Mimes.Type.AUDIO; 14 | public static final int PICS = Mimes.Type.IMAGE; 15 | 16 | @Types 17 | private int type; 18 | 19 | public FileFilterOption(@Types int type) { 20 | this.type = type; 21 | } 22 | 23 | @Types 24 | public int getType() { 25 | return type; 26 | } 27 | 28 | @IntDef({All, DOCS, VID, AUD, PICS}) 29 | public @interface Types { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/model/FileOption.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.model; 2 | 3 | import androidx.annotation.IntDef; 4 | 5 | public class FileOption { 6 | 7 | public static final int OPEN = 0; 8 | public static final int SHARE = 1; 9 | public static final int DOWNLOAD = 2; 10 | public static final int DELETE = 3; 11 | public static final int OFFLINE_DISABLED = 4; 12 | public static final int OFFLINE_ENABLED = 5; 13 | public static final int FILE_INFO = 6; 14 | @Types 15 | private int type; 16 | 17 | public FileOption(@Types int type) { 18 | this.type = type; 19 | } 20 | 21 | @Types 22 | public int getType() { 23 | return type; 24 | } 25 | 26 | @IntDef({OPEN, SHARE, DOWNLOAD, DELETE, OFFLINE_DISABLED, OFFLINE_ENABLED, FILE_INFO}) 27 | public @interface Types { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/model/FileSortOption.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.model; 2 | 3 | import androidx.annotation.IntDef; 4 | 5 | public class FileSortOption { 6 | 7 | //Specifying positions to be on the Sorting selection dialog 8 | public static final int NAME_ASC = 0; 9 | public static final int NAME_DES = 1; 10 | public static final int TIME_ASC = 2; 11 | public static final int TIME_DES = 3; 12 | public static final int SIZE_ASC = 4; 13 | public static final int SIZE_DES = 5; 14 | public static final int FILE_TYPE = 6; 15 | 16 | @Types 17 | private int type; 18 | 19 | public FileSortOption(@Types int type) { 20 | this.type = type; 21 | } 22 | 23 | @Types 24 | public int getType() { 25 | return type; 26 | } 27 | 28 | @IntDef({NAME_ASC, NAME_DES, TIME_ASC, TIME_DES, SIZE_ASC, SIZE_DES, FILE_TYPE}) 29 | public @interface Types { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/model/UploadFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.model; 21 | 22 | public class UploadFile { 23 | private int id; 24 | private String path; 25 | 26 | public UploadFile(int id, String path) { 27 | this.id = id; 28 | this.path = path; 29 | } 30 | 31 | public int getId() { 32 | return id; 33 | } 34 | 35 | public String getPath() { 36 | return path; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/server/Api.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.server; 21 | 22 | import org.amahi.anywhere.BuildConfig; 23 | 24 | /** 25 | * API properties accessor. 26 | */ 27 | public final class Api { 28 | private Api() { 29 | } 30 | 31 | public static String getAmahiUrl() { 32 | return BuildConfig.API_URL_AMAHI; 33 | } 34 | 35 | public static String getProxyUrl() { 36 | return BuildConfig.API_URL_PROXY; 37 | } 38 | 39 | public static String getClientId() { 40 | return BuildConfig.API_CLIENT_ID; 41 | } 42 | 43 | public static String getClientSecret() { 44 | return BuildConfig.API_CLIENT_SECRET; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/server/ApiConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.server; 21 | 22 | public enum ApiConnection { 23 | AUTO, 24 | LOCAL, 25 | REMOTE 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/server/api/ProxyApi.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.server.api; 21 | 22 | import org.amahi.anywhere.server.model.ServerRoute; 23 | 24 | import retrofit2.Call; 25 | import retrofit2.http.Header; 26 | import retrofit2.http.PUT; 27 | 28 | 29 | /** 30 | * Proxy API declaration. 31 | */ 32 | public interface ProxyApi { 33 | @PUT("/client") 34 | Call getServerRoute( 35 | @Header("Session") String session); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/server/model/Authentication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.server.model; 21 | 22 | import com.google.gson.annotations.SerializedName; 23 | 24 | /** 25 | * Authentication API resource. 26 | */ 27 | public class Authentication { 28 | @SerializedName("access_token") 29 | private String token; 30 | 31 | public String getToken() { 32 | return token; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/tv/activity/IntroActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.tv.activity; 21 | 22 | import android.app.Activity; 23 | import android.os.Bundle; 24 | import androidx.annotation.Nullable; 25 | 26 | import org.amahi.anywhere.R; 27 | 28 | public class IntroActivity extends Activity { 29 | @Override 30 | protected void onCreate(@Nullable Bundle savedInstanceState) { 31 | super.onCreate(savedInstanceState); 32 | setContentView(R.layout.activity_intro); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/AppTheme.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.util; 2 | 3 | public enum AppTheme { 4 | DEFAULT, 5 | LIGHT, 6 | DARK 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/BlurBuilder.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.util; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.renderscript.Allocation; 6 | import android.renderscript.Element; 7 | import android.renderscript.RenderScript; 8 | import android.renderscript.ScriptIntrinsicBlur; 9 | 10 | public class BlurBuilder { 11 | private static final float BITMAP_SCALE = 0.2f; 12 | private static final float BLUR_RADIUS = 7.5f; 13 | 14 | public static Bitmap blur(Context context, Bitmap image) { 15 | int width = Math.round(image.getWidth() * BITMAP_SCALE); 16 | int height = Math.round(image.getHeight() * BITMAP_SCALE); 17 | 18 | Bitmap inputBitmap = Bitmap.createScaledBitmap(image, width, height, false); 19 | Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap); 20 | 21 | RenderScript rs = RenderScript.create(context); 22 | ScriptIntrinsicBlur theIntrinsic = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); 23 | Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap); 24 | Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap); 25 | theIntrinsic.setRadius(BLUR_RADIUS); 26 | theIntrinsic.setInput(tmpIn); 27 | theIntrinsic.forEach(tmpOut); 28 | tmpOut.copyTo(outputBitmap); 29 | 30 | return outputBitmap; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/CheckTV.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Amahi 3 | * 4 | * This file is part of Amahi. 5 | * 6 | * Amahi is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Amahi is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Amahi. If not, see . 18 | */ 19 | 20 | package org.amahi.anywhere.util; 21 | 22 | import android.app.UiModeManager; 23 | import android.content.Context; 24 | import android.content.res.Configuration; 25 | 26 | import static android.content.Context.UI_MODE_SERVICE; 27 | 28 | public class CheckTV { 29 | 30 | public static boolean isATV(Context context) { 31 | UiModeManager uiModeManager = (UiModeManager) context.getSystemService(UI_MODE_SERVICE); 32 | return (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/CustomEditTextPreference.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.util; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.preference.EditTextPreference; 6 | 7 | import android.util.AttributeSet; 8 | 9 | import org.amahi.anywhere.R; 10 | 11 | public class CustomEditTextPreference extends EditTextPreference { 12 | 13 | public CustomEditTextPreference(Context context, AttributeSet attrs) { 14 | super(context, attrs); 15 | setDialogLayoutResource(R.layout.custom_edittext_preference); 16 | setNegativeButtonText("Cancel"); 17 | setPositiveButtonText("OK"); 18 | 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/DateTime.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.util; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Calendar; 5 | import java.util.Date; 6 | 7 | public class DateTime { 8 | 9 | public static String getCurrentTime() { 10 | Date c = Calendar.getInstance().getTime(); 11 | SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy hh:mm"); 12 | return df.format(c); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/RecyclerViewItemClickListener.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.util; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * RecyclerViewItemClickListener interface. 7 | * Handles onItemClick and onLongItemClick for RecyclerView 8 | */ 9 | 10 | public interface RecyclerViewItemClickListener { 11 | 12 | void onItemClick(View view, int position); 13 | 14 | boolean onLongItemClick(View view, int position); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/util/ServerFileClickListener.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.util; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * ServerFileClickListener interface. 7 | * Handles onItemClick and onMoreOptionClick for ServerFileAdapter 8 | */ 9 | 10 | public interface ServerFileClickListener { 11 | 12 | void onItemClick(View view, int position); 13 | 14 | void onMoreOptionClick(View view, int position); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/amahi/anywhere/view/SeekView.java: -------------------------------------------------------------------------------- 1 | package org.amahi.anywhere.view; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.TextView; 8 | 9 | import org.amahi.anywhere.R; 10 | 11 | 12 | public class SeekView { 13 | 14 | 15 | private View view; 16 | private TextView textView; 17 | 18 | public SeekView(ViewGroup viewGroup) { 19 | LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 20 | view = inflater.inflate(R.layout.seek_view, viewGroup, false); 21 | view.requestLayout(); 22 | textView = view.findViewById(R.id.seek_value); 23 | } 24 | 25 | public View getView() { 26 | return view; 27 | } 28 | 29 | public void setText(String s) { 30 | textView.setText(s); 31 | } 32 | 33 | public void hide() { 34 | view.setVisibility(View.GONE); 35 | } 36 | 37 | public void show() { 38 | view.setVisibility(View.VISIBLE); 39 | } 40 | 41 | public boolean isShowing() { 42 | return view.getVisibility() == View.VISIBLE; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/res/anim/recycler_list_anim.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 24 | -------------------------------------------------------------------------------- /src/main/res/anim/slide_down_text.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/anim/slide_down_view.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/anim/slide_up_text.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/anim/slide_up_view.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/color/text_input_box_stroke.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/bg_shadow_drawer.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/bg_shadow_drawer.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/ic_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_banner_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/ic_banner_white.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/movies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/movies.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/music.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/network.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/photos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/photos.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tick.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_archive.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_audio.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_code.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_document.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_folder.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_generic.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_images.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_presentation.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_spreadsheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_spreadsheet.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/tv_ic_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-hdpi/tv_ic_video.png -------------------------------------------------------------------------------- /src/main/res/drawable-nodpi/ic_app_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-nodpi/ic_app_logo.png -------------------------------------------------------------------------------- /src/main/res/drawable-nodpi/ic_app_logo_shadowless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-nodpi/ic_app_logo_shadowless.png -------------------------------------------------------------------------------- /src/main/res/drawable-notnight-hdpi/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-notnight-hdpi/ic_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-notnight-xhdpi/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-notnight-xhdpi/ic_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-notnight-xxhdpi/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-notnight-xxhdpi/ic_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/default_audiotrack.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_apps.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_close_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_menu_settings.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_more_vert.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_offline_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_queue_music_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_recent_files_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_right_arrow_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_share_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/ic_shares.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/nav_arrow_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-notnight/nav_arrow_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/bg_shadow_drawer.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/bg_shadow_drawer.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/ic_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_banner_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/ic_banner_white.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/nav_arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/nav_arrow_down.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/nav_arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/nav_arrow_up.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/tv_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xhdpi/tv_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/bg_shadow_drawer.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xxhdpi/bg_shadow_drawer.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xxhdpi/ic_banner.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/ic_banner_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xxhdpi/ic_banner_white.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/nav_arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xxhdpi/nav_arrow_down.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/nav_arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable-xxhdpi/nav_arrow_up.png -------------------------------------------------------------------------------- /src/main/res/drawable/default_audiotrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable/default_audiotrack.png -------------------------------------------------------------------------------- /src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_apps.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_brightness.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_camera.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_cast.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_cellular_data.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_check.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_close_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_cloud_upload.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_delete.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_delete_dialog.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_duplicate_dialog.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_error_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_archive.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_audio.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_code.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_directory.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_generic.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_image.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_presentation.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_spreadsheet.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_text.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_file_video.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_filter.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_info_dialog.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_info_outline.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_menu_back.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_menu_download.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_menu_forward.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_menu_settings.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_more_vert.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_offline_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_offline_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_pause_36dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_pause_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_play_36dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_play_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_queue_music_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_recent_files_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_right_arrow_24dp.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_server.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_app_theme.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_connection.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_feedback.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_friend.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_intro.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_logout.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_rate.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_translate.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_upload_photo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_settings_version.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_share.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_share_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_shares.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_skip_next_36dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_skip_previous_36dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_sort.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_switch.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_upload_location.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_volume_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/res/drawable/nav_arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable/nav_arrow_down.png -------------------------------------------------------------------------------- /src/main/res/drawable/nav_arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/drawable/nav_arrow_up.png -------------------------------------------------------------------------------- /src/main/res/drawable/percentage_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/drawable/scrollbar.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/drawable/splash_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/white_cursor.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_authentication.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_intro.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_main_tv.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_server_app.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 26 | 27 | 32 | 33 | 37 | 38 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_server_file_image.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_server_file_tv.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_server_file_web.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 26 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_tv_audio_playback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 15 | 16 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_tv_video_playback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 12 | 13 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_tv_web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_web_view.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 27 | -------------------------------------------------------------------------------- /src/main/res/layout/custom_edittext_preference.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/res/layout/fragment_prepare_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/res/layout/fragment_server_file_image.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 24 | 29 | 30 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/res/layout/onboarding_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/res/layout/seek_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/res/layout/shares_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/res/layout/subtitles_surface.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/main/res/layout/tv_header_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/res/layout/tv_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/res/layout/upload_bottom_sheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 19 | 20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/res/layout/upload_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/res/menu/action_bar_cast_button.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 22 | 23 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/main/res/menu/action_bar_expanded_controller.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 23 | 24 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/res/menu/action_bar_navigation.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/res/menu/action_bar_server_app.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 22 | 23 | 28 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/res/menu/action_bar_video_files.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 22 | 23 | 29 | 30 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amahi/android/22da958938b0e950a7c23408272ac267e87b088e/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/main/res/values-sw600dp/bools.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | true 23 | 24 | -------------------------------------------------------------------------------- /src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | server_file 23 | server_share 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/res/values/bools.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | false 23 | 24 | -------------------------------------------------------------------------------- /src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 12sp 24 | 14sp 25 | 18sp 26 | 22sp 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /src/main/res/xml/authenticator.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/res/xml/searchable.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | --------------------------------------------------------------------------------