Merge "- disable "connect" btn if ssid is invalid/empty - show toast if connection failed." into oc-mr1-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index abf0748..c80cb87 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -65,9 +65,12 @@
android:windowSoftInputMode="adjustPan"
android:launchMode="singleTask"
android:exported="true">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
+ <!-- Set priority high enough to trump the phone setting app -->
+ <!-- TODO: once phone setting is removed from car system image, set priority to 1 -->
+ <intent-filter android:priority="10">
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.settings.SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
diff --git a/res/color/action_bar_btn.xml b/res/color/action_bar_btn.xml
new file mode 100644
index 0000000..87789db
--- /dev/null
+++ b/res/color/action_bar_btn.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="true"
+ android:color="@color/car_teal_700" />
+ <item android:state_enabled="false"
+ android:alpha="0.5"
+ android:color="@color/car_teal_700" />
+</selector>
\ No newline at end of file
diff --git a/res/layout/action_bar_with_button.xml b/res/layout/action_bar_with_button.xml
index e4d2c01..6e909aa 100644
--- a/res/layout/action_bar_with_button.xml
+++ b/res/layout/action_bar_with_button.xml
@@ -58,7 +58,7 @@
android:layout_marginTop="@dimen/optical_center_offset"
android:background="@null"
style="@style/CarTitle"
- android:textColor="@color/car_teal_700"
+ android:textColor="@color/action_bar_btn"
android:textAllCaps="true"
android:visibility="gone"
android:layout_marginEnd="@dimen/button_margin" />
@@ -71,7 +71,7 @@
android:layout_marginTop="@dimen/optical_center_offset"
android:background="@null"
style="@style/CarTitle"
- android:textColor="@color/car_teal_700"
+ android:textColor="@color/action_bar_btn"
android:textAllCaps="true"
android:layout_marginEnd="@dimen/action_bar_end_widget_margin_end" />
</LinearLayout>
diff --git a/src/com/android/car/settings/sound/SoundSettingsFragment.java b/src/com/android/car/settings/sound/SoundSettingsFragment.java
index c1ff5a6..c729381 100644
--- a/src/com/android/car/settings/sound/SoundSettingsFragment.java
+++ b/src/com/android/car/settings/sound/SoundSettingsFragment.java
@@ -134,6 +134,7 @@
for (VolumeLineItem item : mVolumeLineItems) {
item.stop();
}
+ mVolumeLineItems.clear();
mCar.disconnect();
}