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

Commit ce0f9c04 authored by Ahmad Khalil's avatar Ahmad Khalil
Browse files

Add back the legacy SoundPicker and create a separate directory for the new picker.

We're bringing back the legacy SoundPicker and moving the new picker implementation into a separate directory (SoundPicker2). This way the currently released picker won't be using any unreleased (flagged) apis, and we won't leak the new features until they are un-flagged.

Bug: 293846645
Test: N/A
Change-Id: Iaf5780bc0efcb2095c9eba4129a75d06982bd140
parent 102064b4
Loading
Loading
Loading
Loading
+9 −27
Original line number Diff line number Diff line
@@ -7,40 +7,22 @@ package {
    default_applicable_licenses: ["frameworks_base_license"],
}

android_library {
    name: "SoundPickerLib",
    srcs: [
        "src/**/*.java",
android_app {
    name: "SoundPicker",
    defaults: ["platform_app_defaults"],
    manifest: "AndroidManifest.xml",

    static_libs: [
        "androidx.appcompat_appcompat",
    ],
    resource_dirs: [
        "res",
    ],
    static_libs: [
        "androidx.appcompat_appcompat",
        "hilt_android",
        "guava",
        "androidx.recyclerview_recyclerview",
        "androidx-constraintlayout_constraintlayout",
        "androidx.viewpager2_viewpager2",
        "com.google.android.material_material",
    srcs: [
        "src/**/*.java",
    ],
}

android_app {
    name: "SoundPicker",
    defaults: ["platform_app_defaults"],
    manifest: "AndroidManifest.xml",
    static_libs: ["SoundPickerLib"],
    platform_apis: true,
    certificate: "media",
    privileged: true,

    optimize: {
        enabled: true,
        optimize: true,
        shrink: true,
        shrink_resources: true,
        obfuscate: false,
        proguard_compatibility: false,
    },
}
+11 −18
Original line number Diff line number Diff line
@@ -9,13 +9,9 @@
    <uses-permission android:name="android.permission.RECEIVE_DEVICE_CUSTOMIZATION_READY" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />

    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />

    <application
            android:name=".RingtonePickerApplication"
        android:allowBackup="false"
        android:label="@string/app_label"
            android:theme="@style/Theme.AppCompat"
        android:supportsRtl="true">
        <receiver android:name="RingtoneReceiver"
                  android:exported="true">
@@ -27,16 +23,13 @@
        <service android:name="RingtoneOverlayService" />

        <activity android:name="RingtonePickerActivity"
                android:theme="@style/Theme.AppCompat.Dialog"
                  android:theme="@style/PickerDialogTheme"
                  android:enabled="@*android:bool/config_defaultRingtonePickerEnabled"
                  android:excludeFromRecents="true"
                  android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.RINGTONE_PICKER" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.RINGTONE_PICKER_SOUND" />
                <category android:name="android.intent.category.RINGTONE_PICKER_VIBRATION" />
                <category android:name="android.intent.category.RINGTONE_PICKER_RINGTONE" />
            </intent-filter>
        </activity>
    </application>
+15 −17
Original line number Diff line number Diff line
@@ -19,9 +19,7 @@
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
              android:background="?android:attr/selectableItemBackground"
              android:focusable="true"
              android:clickable="true">
              android:background="?android:attr/selectableItemBackground">

    <ImageView
        android:layout_width="24dp"
@@ -33,7 +31,7 @@
        android:layout_marginLeft="24dp"
        android:src="@drawable/ic_add" />

    <TextView
    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/add_new_sound_text"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
+9 −11
Original line number Diff line number Diff line
@@ -14,14 +14,12 @@
     limitations under the License.
-->

<com.android.soundpicker.CheckedListItem
    xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.soundpicker.CheckedListItem xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:gravity="center_vertical"
     android:background="?android:attr/selectableItemBackground"
    android:focusable="true"
    android:clickable="true">
    >

    <CheckedTextView
        android:id="@+id/checked_text_view"
+0 −4
Original line number Diff line number Diff line
@@ -40,8 +40,4 @@

    <!-- Text for the name of the app. [CHAR LIMIT=12] -->
    <string name="app_label">Sounds</string>

    <string name="empty_list">The list is empty</string>
    <string name="sound_page_title">Sound</string>
    <string name="vibration_page_title">Vibration</string>
</resources>
Loading