Commit 065f7af5 authored by aberent's avatar aberent Committed by Commit bot

Move MediaController.java upstream to Chromium repository.

MediaController.java is used by the android cast code which upstreamed from the private Chrome for Android repository.
It derives from open source Android source code,
specifically from one of the Android supportv4 samples, and has been
in the downstream repository for some time.

See the README.chromium file for more details.

BUG=315088

Review URL: https://codereview.chromium.org/1008603003

Cr-Commit-Position: refs/heads/master@{#322461}
parent 99763b45
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
assert(is_android)
android_resources("android_media_resources") {
custom_package = "org.chromium.third_party.android.media"
resource_dirs = [ "java/res" ]
deps = [
"//third_party/android_tools:android_support_v7_appcompat_resources",
"//third_party/android_tools:android_support_v7_mediarouter_resources",
]
}
android_library("android_media_java") {
DEPRECATED_java_in_dir = "java/src"
deps = [
":android_media_resources",
"//third_party/android_tools:android_support_v7_mediarouter_java",
"//third_party/android_tools:android_support_v7_mediarouter_resources",
"//third_party/android_tools:android_support_v7_appcompat_java",
"//third_party/android_tools:android_support_v13_java",
]
}
This diff is collapsed.
aberent@chromium.org
dgn@chromium.org
avayvod@chromium.org
\ No newline at end of file
Name: MediaController android sample.
URL: https://android.googlesource.com/platform/development/+/master/samples/Support4Demos/src/com/example/android/supportv4/media/MediaController.java
Version: 74c5bcff29959931c8a4b15e4afa613975a47f4c
License: Apache 2.0
Security Critical: no
Description:
This contains a modified copy of MediaController.java and the associated
resources.
MediaController.java is based on a public supportv4 android sample available
as part of the Android support libraries installation (see
http://developer.android.com/tools/support-library/index.html). It is also
available from:
https://android.googlesource.com/platform/development/+/master/samples/Support4Demos/src/com/example/android/supportv4/media/MediaController.java
Local Modifications:
The only changes are some minor bug fixes.
\ No newline at end of file
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'android_media_java',
'type': 'none',
'dependencies': [
'../android_tools/android_tools.gyp:android_support_v13_javalib',
],
'variables': {
'java_in_dir': 'java',
'has_java_resources': 1,
'R_package': 'org.chromium.third_party.android.media',
'R_package_relpath': 'org/chromium/third_party/android/media',
},
'includes': [ '../../build/java.gypi' ],
},
],
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- This file is taken from the Android codebase.
samples/Support4Demos/res/layout/media_controller.xml
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="4dip"
android:orientation="horizontal">
<ImageButton
android:id="@+id/prev"
android:contentDescription="@null"
style="@android:style/MediaButton.Previous" />
<ImageButton
android:id="@+id/rew"
android:contentDescription="@null"
style="@android:style/MediaButton.Rew" />
<ImageButton
android:id="@+id/pause"
android:contentDescription="@null"
style="@android:style/MediaButton.Play" />
<ImageButton
android:id="@+id/ffwd"
android:contentDescription="@null"
style="@android:style/MediaButton.Ffwd" />
<ImageButton
android:id="@+id/next"
android:contentDescription="@null"
style="@android:style/MediaButton.Next" />
</LinearLayout>
<LinearLayout
android:id="@+id/mediacontroller_progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:id="@+id/time_current"
android:textSize="14sp"
android:textStyle="bold"
android:paddingTop="4dip"
android:paddingStart="4dip"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="4dip"
android:textColor="@color/cast_media_controller_text" />
<SeekBar
android:id="@+id/mediacontroller_progress_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="32dip" />
<TextView android:id="@+id/time"
android:textSize="14sp"
android:textStyle="bold"
android:paddingTop="4dip"
android:paddingEnd="4dip"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="4dip"
android:textColor="@color/cast_media_controller_text" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<resources>
<!-- Cast colors -->
<!-- This is the same as the internal Android color "dim_foreground_dark"
which is used in MediaController. -->
<color name="cast_media_controller_text">#bebebe</color>
</resources>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment