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

Commit 894898c5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add CarVolumeDialogController in SystemUI for Android Auto."

parents fb157032 634acb97
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUI-proto-tags

LOCAL_JAVA_LIBRARIES := telephony-common
LOCAL_JAVA_LIBRARIES += android.car

LOCAL_PACKAGE_NAME := SystemUI
LOCAL_CERTIFICATE := platform
+3 −0
Original line number Diff line number Diff line
@@ -162,6 +162,9 @@
    <!-- It's like, reality, but, you know, virtual -->
    <uses-permission android:name="android.permission.ACCESS_VR_MANAGER" />

    <!-- To control car audio module volume -->
    <uses-permission android:name="android.car.permission.CAR_CONTROL_AUDIO_VOLUME" />

    <application
        android:name=".SystemUIApplication"
        android:persistent="true"
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
-keep class com.android.systemui.statusbar.car.CarStatusBar
-keep class com.android.systemui.statusbar.phone.PhoneStatusBar
-keep class com.android.systemui.statusbar.tv.TvStatusBar
-keep class com.android.systemui.car.CarSystemUIFactory
-keep class com.android.systemui.SystemUIFactory

-keepclassmembers class ** {
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui;

import android.content.ComponentName;
import android.content.Context;
import android.util.Log;
import android.view.View;
@@ -46,6 +47,7 @@ import com.android.systemui.statusbar.policy.SecurityController;
import com.android.systemui.statusbar.policy.UserInfoController;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.volume.VolumeDialogController;

/**
 * Class factory to provide customizable SystemUI components.
@@ -93,6 +95,11 @@ public class SystemUIFactory {
        return new ScrimController(scrimBehind, scrimInFront, headsUpScrim);
    }

    public VolumeDialogController createVolumeDialogController(Context context,
            ComponentName name) {
        return new VolumeDialogController(context, name);
    }

    public NotificationIconAreaController createNotificationIconAreaController(Context context,
            PhoneStatusBar phoneStatusBar) {
        return new NotificationIconAreaController(context, phoneStatusBar);
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 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.systemui.car;

import android.content.ComponentName;
import android.content.Context;

import com.android.systemui.SystemUIFactory;
import com.android.systemui.volume.VolumeDialogController;
import com.android.systemui.volume.car.CarVolumeDialogController;

/**
 * Class factory to provide car specific SystemUI components.
 */
public class CarSystemUIFactory extends SystemUIFactory {
    @Override
    public VolumeDialogController createVolumeDialogController(Context context,
            ComponentName name) {
        return new CarVolumeDialogController(context, name);
    }
}
Loading