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

Commit 166e7b17 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "PowerWidget : Indicator observer / Hide onLongClick" into ics

parents 379e40fc bf11c2fa
Loading
Loading
Loading
Loading
+0 −28
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.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_pressed="true"
        android:drawable="@drawable/stat_inner_press" />

    <item android:state_focused="true" android:state_enabled="true"
        android:state_window_focused="true"
        android:drawable="@drawable/stat_inner_focus" />

    <item
         android:drawable="@drawable/stat_power_background" />
</selector>
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
        android:orientation="vertical"
        android:clickable="true"
        android:focusable="true"
        android:background="@drawable/stat_power_bg">
        android:background="@drawable/stat_power_background">
    <ImageView android:id="@+id/power_widget_button_image"
           android:layout_width="match_parent"
            android:layout_height="0dip"
+6 −1
Original line number Diff line number Diff line
@@ -348,7 +348,12 @@ public class PhoneStatusBar extends StatusBar {
                        }
                    }
                });

        mPowerWidget.setGlobalButtonOnLongClickListener(new View.OnLongClickListener() {
            public boolean onLongClick(View v) {
                animateCollapse();
                return true;
            }
        });

        mTicker = new MyTicker(context, sb);

+5 −0
Original line number Diff line number Diff line
@@ -266,6 +266,11 @@ public class PowerWidget extends FrameLayout {
                    Settings.System.getUriFor(Settings.System.EXPANDED_VIEW_WIDGET_COLOR),
                            false, this);

            // watch for changes in indicator visibility
            resolver.registerContentObserver(
                    Settings.System.getUriFor(Settings.System.EXPANDED_HIDE_INDICATOR),
                            false, this);

            // watch for power-button specifc stuff that has been loaded
            for(Uri uri : PowerButton.getAllObservedUris()) {
                resolver.registerContentObserver(uri, false, this);