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

Commit 0bd445b9 authored by Michael Chan's avatar Michael Chan
Browse files

b/2296110 New Dialog which appears when phone is place on dock.

Change-Id: I58b216ee9b4ca9ce16210309358c0512271e128e
parent 3327f788
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -488,6 +488,22 @@
            </intent-filter>
        </activity>

        <receiver
            android:name=".bluetooth.DockAudioStateChangeReceiver"
            >
            <intent-filter>
                <action android:name="android.intent.action.DOCK_EVENT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>

        <activity android:name=".bluetooth.DockSettingsActivity"
                  android:label="@string/bluetooth_dock_settings"
                  android:launchMode="singleTask"
                  android:excludeFromRecents="true"
                  android:theme="@*android:style/Theme.Dialog.Alert">
        </activity>

        <activity android:name=".bluetooth.RequestPermissionActivity"
                  android:label="@string/bluetooth_permission_request"
                  android:excludeFromRecents="true"
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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.
-->

<CheckBox
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/remember"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/bluetooth_dock_settings_remember"
    android:focusable="true"
    android:clickable="true" />
+16 −1
Original line number Diff line number Diff line
@@ -643,6 +643,19 @@
    <!-- Bluetooth settings.  Connection options screen.  The summary for the OPP checkbox preference that describes how checking it will set the OPP profile as preferred. -->
    <string name="bluetooth_opp_profile_summary_use_for">Use for file transfer</string>

    <!-- Bluetooth settings.  Dock Setting Title -->
    <string name="bluetooth_dock_settings">Dock Settings</string>
    <!-- Bluetooth settings.  Dock Setting Dialog Title -->
    <string name="bluetooth_dock_settings_title">Use dock for audio</string>
    <!-- Bluetooth settings.  Dock Setting Dialog - Checkbox selection 1: Use dock as speaker phone -->
    <string name="bluetooth_dock_settings_headset">As speaker phone</string>
    <!-- Bluetooth settings.  Dock Setting Dialog - Checkbox selection 2: Use dock for media audio -->
    <string name="bluetooth_dock_settings_a2dp">For music and media</string>
    <!-- Bluetooth settings.  Dock Setting Dialog - Remember setting and don't ask user again -->
    <string name="bluetooth_dock_settings_remember">Remember settings</string>
    <!-- Bluetooth settings.  Dock Setting Dialog - Hint for the user to chagne setting after checking "remember settings" -->
    <string name="bluetooth_dock_settings_hint">"Change with Settings under Sound &amp; display &gt; Dock audio</string>

    <!-- Wi-Fi settings -->
    <!-- Used in the 2nd-level settings screen to turn on Wi-Fi -->
    <string name="wifi">Wi-Fi</string>
@@ -895,7 +908,9 @@
    <!-- Sound settings screen, setting option summary text -->
    <string name="media_volume_summary">Set volume for music and videos</string>
    <!-- Sound settings screen, dock settings -->
    <string name="dock_settings_title">Dock settings</string>
    <string name="dock_settings_title">Dock audio</string>
    <!-- Sound settings screen, dock settings summary-->
    <string name="dock_settings_summary">Audio settings for the attached dock</string>
    <!-- Sound settings screen, setting check box label -->
    <string name="dtmf_tone_enable_title">Audible touch tones</string>
    <!-- Sound settings screen, setting option summary text when check box is selected -->
+17 −20
Original line number Diff line number Diff line
@@ -50,12 +50,9 @@
        <PreferenceScreen
                android:key="dock_settings"
                android:order="4"
                android:title="@string/dock_settings_title">
            <intent
                android:action="android.intent.action.MAIN"
                android:targetPackage="com.android.settings"
                android:targetClass="com.android.settings.bluetooth.DockSettingsActivity" />
        </PreferenceScreen>
                android:title="@string/dock_settings_title"
                android:summary="@string/dock_settings_summary"
                android:widgetLayout="@*android:layout/preference_dialog" />

        <com.android.settings.DefaultRingtonePreference
                android:key="ringtone"
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
package com.android.settings;

import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;

import com.android.settings.bluetooth.DockSettingsActivity;

import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
@@ -104,6 +107,8 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements

    private PreferenceGroup mSoundSettings;

    private Intent mDockIntent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -217,6 +222,9 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
            if (dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
                // Show dock settings item
                mSoundSettings.addPreference(mDockSettings);

                // Save the intent to send to the activity
                mDockIntent = intent;
            } else {
                // Remove dock settings item
                mSoundSettings.removePreference(mDockSettings);
@@ -346,6 +354,10 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
            boolean value = mNotificationPulse.isChecked();
            Settings.System.putInt(getContentResolver(),
                    Settings.System.NOTIFICATION_LIGHT_PULSE, value ? 1 : 0);
        } else if (preference == mDockSettings) {
            Intent i = new Intent(mDockIntent);
            i.setClass(this, DockSettingsActivity.class);
            startActivity(i);
        }

        return true;
Loading