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

Commit fa7887be authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Intruder alerts with actions and swipe-to-cancel.

Change-Id: I1d8c7d32bcbf4d3910bb866431e92a8639e4e28b
parent fc90b6a7
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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"
        android:exitFadeDuration="@android:integer/config_mediumAnimTime">
    <item android:state_pressed="true"  android:drawable="@drawable/intruder_bg_pressed" />
</selector>
+272 B
Loading image diff...
+15 −33
Original line number Diff line number Diff line
@@ -19,40 +19,22 @@
-->

<!--    android:background="@drawable/status_bar_closed_default_background" -->
<FrameLayout
<com.android.systemui.statusbar.policy.IntruderAlertView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="32dip"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:paddingLeft="8dip"
    android:paddingRight="8dip"
    android:orientation="vertical"
    >
        
    <LinearLayout 
        android:id="@+id/intruder_alert_content"
    <FrameLayout
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:animationCache="false"
        android:orientation="horizontal"
        android:background="@drawable/alert_bar_background"
        android:clickable="true"
        android:focusable="true"
        android:descendantFocusability="afterDescendants"
        >

        <ImageView
            android:id="@+id/alertIcon"
            android:layout_width="25dip"
            android:layout_height="25dip"
            android:layout_marginLeft="6dip"
            android:layout_marginRight="8dip"
        android:id="@+id/contentHolder"
        android:background="@drawable/intruder_window_bg"
        />
        <TextView
            android:id="@+id/alertText"
            android:textAppearance="@style/TextAppearance.StatusBar.IntruderAlert"
<!--    <ImageView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
            android:singleLine="true"
            />
    </LinearLayout>
</FrameLayout>
        android:src="@drawable/title_bar_shadow"
        android:scaleType="fitXY"
        /> -->
</com.android.systemui.statusbar.policy.IntruderAlertView>
+1 −0
Original line number Diff line number Diff line
@@ -30,4 +30,5 @@
    <color name="notification_list_shadow_top">#80000000</color>
    <drawable name="recents_callout_line">#99ffffff</drawable>
    <drawable name="notification_item_background_legacy_color">#ffaaaaaa</drawable>
    <drawable name="intruder_bg_pressed">#ff33B5E5</drawable>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -158,4 +158,8 @@ public abstract class BaseStatusBar extends SystemUI implements CommandQueue.Cal
        }
        return vetoButton;
    }
    
    public void dismissIntruder() {
        // pass
    }
}
Loading