Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bcd4035 authored by linanson's avatar linanson
Browse files

SeamlessMedia button as one of media action button

- Implement the mechanism for Seamless button in the group of media action button.
- Have a fake Seamless icon in the right of media action button group.
- Need to bind with MediaOutputSlice that are implementing.

Bug: 118428931
Test: Build pass
Change-Id: Idc51d416cc1fc85babdc83d138c8558db5ed5d8e
parent 5fbcaf46
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -8122,6 +8122,10 @@ public class Notification implements Parcelable
                    big.setViewVisibility(MEDIA_BUTTON_IDS[i], View.GONE);
                }
            }
            bindMediaActionButton(big, R.id.media_seamless, new Action(R.drawable.ic_media_seamless,
                    mBuilder.mContext.getString(
                            com.android.internal.R.string.ext_media_seamless_action), null), p);
            big.setViewVisibility(R.id.media_seamless, View.GONE);
            handleImage(big);
            return big;
        }
+25 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2017 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"
        android:tint="?android:attr/colorControlNormal">
    <path
        android:fillColor="#FF000000"
        android:pathData="M12,3l0.01,10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55C7.79,13 6,14.79 6,17c0,2.21 1.79,4 4.01,4S14,19.21 14,17V7h4V3H12zM10.01,19c-1.1,0 -2,-0.9 -2,-2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2C12.01,18.1 11.11,19 10.01,19z"/>
</vector>
+4 −0
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@
                layout="@layout/notification_material_media_action"
                android:id="@+id/action4"
            />
            <include
                layout="@layout/notification_material_media_action"
                android:id="@+id/media_seamless"
            />
        </LinearLayout>
    </LinearLayout>
</com.android.internal.widget.MediaNotificationView>
+3 −0
Original line number Diff line number Diff line
@@ -3692,6 +3692,9 @@
    <!-- Notification action to browse external media [CHAR LIMIT=20] -->
    <string name="ext_media_browse_action">Explore</string>

    <!-- Notification action to transfer media [CHAR LIMIT=40] -->
    <string name="ext_media_seamless_action">Seamless transfer</string>

    <!-- Notification title when external media is missing [CHAR LIMIT=30] -->
    <string name="ext_media_missing_title"><xliff:g id="name" example="SD card">%s</xliff:g> missing</string>
    <!-- Notification body when external media is missing [CHAR LIMIT=30] -->
+3 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@
  <java-symbol type="id" name="action2" />
  <java-symbol type="id" name="action3" />
  <java-symbol type="id" name="action4" />
  <java-symbol type="id" name="media_seamless" />
  <java-symbol type="id" name="big_picture" />
  <java-symbol type="id" name="big_text" />
  <java-symbol type="id" name="chronometer" />
@@ -2237,6 +2238,7 @@
  <java-symbol type="string" name="ext_media_init_action" />
  <java-symbol type="string" name="ext_media_unmount_action" />
  <java-symbol type="string" name="ext_media_browse_action" />
  <java-symbol type="string" name="ext_media_seamless_action" />
  <java-symbol type="string" name="ext_media_missing_title" />
  <java-symbol type="string" name="ext_media_missing_message" />
  <java-symbol type="string" name="ext_media_move_specific_title" />
@@ -3098,6 +3100,7 @@
  <java-symbol type="drawable" name="ic_restart" />
  <java-symbol type="drawable" name="ic_screenshot" />
  <java-symbol type="drawable" name="ic_faster_emergency" />
  <java-symbol type="drawable" name="ic_media_seamless" />
  <java-symbol type="drawable" name="emergency_icon" />

  <java-symbol type="array" name="config_convert_to_emergency_number_map" />
Loading