Loading packages/SystemUI/res/drawable/brightness_mirror_background.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@color/system_primary_color" /> <corners android:topLeftRadius="@dimen/notification_material_rounded_rect_radius" android:topRightRadius="@dimen/notification_material_rounded_rect_radius" android:bottomLeftRadius="@dimen/notification_material_rounded_rect_radius" android:bottomRightRadius="@dimen/notification_material_rounded_rect_radius"/> </shape> packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml +1 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,7 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui" style="@style/BrightnessDialogContainer" android:clickable="true"> style="@style/BrightnessDialogContainer"> <ImageView android:id="@+id/brightness_icon" Loading packages/SystemUI/res/layout/super_status_bar.xml +16 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,22 @@ android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"> <FrameLayout android:id="@+id/brightness_mirror" android:layout_width="@dimen/notification_panel_width" android:layout_height="wrap_content" android:layout_gravity="@integer/notification_panel_layout_gravity" android:paddingLeft="@dimen/notification_side_padding" android:paddingRight="@dimen/notification_side_padding" android:visibility="gone"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="2dp" android:background="@drawable/brightness_mirror_background"> <include layout="@layout/quick_settings_brightness_dialog" /> </FrameLayout> </FrameLayout> <com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:id="@+id/backdrop" android:layout_width="match_parent" Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +9 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.systemui.qs.QSTile.DetailAdapter; import com.android.systemui.settings.BrightnessController; import com.android.systemui.settings.ToggleSlider; import com.android.systemui.statusbar.phone.QSTileHost; import com.android.systemui.statusbar.policy.BrightnessMirrorController; import java.util.ArrayList; import java.util.Collection; Loading Loading @@ -105,6 +106,14 @@ public class QSPanel extends ViewGroup { }); } public void setBrightnessMirror(BrightnessMirrorController c) { super.onFinishInflate(); ToggleSlider brightnessSlider = (ToggleSlider) findViewById(R.id.brightness_slider); ToggleSlider mirror = (ToggleSlider) c.getMirror().findViewById(R.id.brightness_slider); brightnessSlider.setMirror(mirror); brightnessSlider.setMirrorController(c); } public void setCallback(Callback callback) { mCallback = callback; } Loading packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java +1 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ public class BrightnessController implements ToggleSlider.Listener { mListening = false; } @Override public void onChanged(ToggleSlider view, boolean tracking, boolean automatic, int value) { updateIcon(mAutomatic); if (!mAutomatic) { Loading Loading
packages/SystemUI/res/drawable/brightness_mirror_background.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@color/system_primary_color" /> <corners android:topLeftRadius="@dimen/notification_material_rounded_rect_radius" android:topRightRadius="@dimen/notification_material_rounded_rect_radius" android:bottomLeftRadius="@dimen/notification_material_rounded_rect_radius" android:bottomRightRadius="@dimen/notification_material_rounded_rect_radius"/> </shape>
packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml +1 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,7 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui" style="@style/BrightnessDialogContainer" android:clickable="true"> style="@style/BrightnessDialogContainer"> <ImageView android:id="@+id/brightness_icon" Loading
packages/SystemUI/res/layout/super_status_bar.xml +16 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,22 @@ android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"> <FrameLayout android:id="@+id/brightness_mirror" android:layout_width="@dimen/notification_panel_width" android:layout_height="wrap_content" android:layout_gravity="@integer/notification_panel_layout_gravity" android:paddingLeft="@dimen/notification_side_padding" android:paddingRight="@dimen/notification_side_padding" android:visibility="gone"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="2dp" android:background="@drawable/brightness_mirror_background"> <include layout="@layout/quick_settings_brightness_dialog" /> </FrameLayout> </FrameLayout> <com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:id="@+id/backdrop" android:layout_width="match_parent" Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +9 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.systemui.qs.QSTile.DetailAdapter; import com.android.systemui.settings.BrightnessController; import com.android.systemui.settings.ToggleSlider; import com.android.systemui.statusbar.phone.QSTileHost; import com.android.systemui.statusbar.policy.BrightnessMirrorController; import java.util.ArrayList; import java.util.Collection; Loading Loading @@ -105,6 +106,14 @@ public class QSPanel extends ViewGroup { }); } public void setBrightnessMirror(BrightnessMirrorController c) { super.onFinishInflate(); ToggleSlider brightnessSlider = (ToggleSlider) findViewById(R.id.brightness_slider); ToggleSlider mirror = (ToggleSlider) c.getMirror().findViewById(R.id.brightness_slider); brightnessSlider.setMirror(mirror); brightnessSlider.setMirrorController(c); } public void setCallback(Callback callback) { mCallback = callback; } Loading
packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java +1 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ public class BrightnessController implements ToggleSlider.Listener { mListening = false; } @Override public void onChanged(ToggleSlider view, boolean tracking, boolean automatic, int value) { updateIcon(mAutomatic); if (!mAutomatic) { Loading