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

Commit ad4ae3ba authored by Ahmad Khalil's avatar Ahmad Khalil Committed by Android (Google) Code Review
Browse files

Merge "Change RingtonePickerActivity to extend AppCompatActivity."

parents f4478328 fe6e6003
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ android_library {
    ],
    static_libs: [
        "androidx.appcompat_appcompat",
        "hilt_android",
        "guava",
    ],
}

+3 −1
Original line number Diff line number Diff line
@@ -12,8 +12,10 @@
    <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">
@@ -25,7 +27,7 @@
        <service android:name="RingtoneOverlayService" />

        <activity android:name="RingtonePickerActivity"
                android:theme="@style/PickerDialogTheme"
                android:theme="@style/Theme.AppCompat.Dialog"
                android:enabled="@*android:bool/config_defaultRingtonePickerEnabled"
                android:excludeFromRecents="true"
                android:exported="true">
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2023 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical" />
 No newline at end of file
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.soundpicker;

import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;

import java.util.concurrent.Executors;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * A factory class used to create {@link ListeningExecutorService}.
 */
@Singleton
public class ListeningExecutorServiceFactory {

    @Inject
    ListeningExecutorServiceFactory() {
    }

    /**
     * Returns a single thread {@link ListeningExecutorService}.
     *
     */
    public ListeningExecutorService createSingleThreadExecutor() {
        return MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor());
    }
}
+9 −2
Original line number Diff line number Diff line
@@ -21,15 +21,22 @@ import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;

import dagger.hilt.android.qualifiers.ApplicationContext;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * A factory class used to create {@link Ringtone}.
 */
@Singleton
public class RingtoneFactory {

    private final Context mApplicationContext;

    RingtoneFactory(Context context) {
        mApplicationContext = context.getApplicationContext();
    @Inject
    RingtoneFactory(@ApplicationContext Context applicationContext) {
        mApplicationContext = applicationContext;
    }

    /**
Loading