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

Commit c2c4f8d8 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android Git Automerger
Browse files

am 50ad6326: am 466b77e9: am 2dd0c3a5: Merge "New lockscreen: allow search...

am 50ad6326: am 466b77e9: am 2dd0c3a5: Merge "New lockscreen: allow search gesture from nav bar." into jb-mr1-dev

* commit '50ad6326':
  New lockscreen: allow search gesture from nav bar.
parents 0ad9356b 50ad6326
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ public class StatusBarManager {
    public static final int DISABLE_RECENT = View.STATUS_BAR_DISABLE_RECENT;
    public static final int DISABLE_BACK = View.STATUS_BAR_DISABLE_BACK;
    public static final int DISABLE_CLOCK = View.STATUS_BAR_DISABLE_CLOCK;
    public static final int DISABLE_SEARCH = View.STATUS_BAR_DISABLE_SEARCH;

    @Deprecated
    public static final int DISABLE_NAVIGATION = 
@@ -54,7 +55,8 @@ public class StatusBarManager {

    public static final int DISABLE_MASK = DISABLE_EXPAND | DISABLE_NOTIFICATION_ICONS
            | DISABLE_NOTIFICATION_ALERTS | DISABLE_NOTIFICATION_TICKER
            | DISABLE_SYSTEM_INFO | DISABLE_RECENT | DISABLE_HOME | DISABLE_BACK | DISABLE_CLOCK;
            | DISABLE_SYSTEM_INFO | DISABLE_RECENT | DISABLE_HOME | DISABLE_BACK | DISABLE_CLOCK
            | DISABLE_SEARCH;

    public static final int NAVIGATION_HINT_BACK_NOP      = 1 << 0;
    public static final int NAVIGATION_HINT_HOME_NOP      = 1 << 1;
+11 −0
Original line number Diff line number Diff line
@@ -2450,6 +2450,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    public static final int STATUS_BAR_DISABLE_RECENT = 0x01000000;
    /**
     * @hide
     *
     * NOTE: This flag may only be used in subtreeSystemUiVisibility. It is masked
     * out of the public fields to keep the undefined bits out of the developer's way.
     *
     * Flag to disable the global search gesture. Don't use this
     * unless you're a special part of the system UI (i.e., setup wizard, keyguard).
     */
    public static final int STATUS_BAR_DISABLE_SEARCH = 0x02000000;
    /**
     * @hide
     */
+20 −0
Original line number Diff line number Diff line
@@ -141,6 +141,16 @@
                />
        </LinearLayout>

        <ImageView
            android:layout_width="128dp"
            android:id="@+id/search_light"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/ic_sysbar_lights_out_dot_large"
            android:scaleType="center"
            android:visibility="gone"
            />

        <com.android.systemui.statusbar.policy.DeadZone
            android:id="@+id/deadzone"
            android:layout_height="match_parent"
@@ -272,6 +282,16 @@
                />
        </LinearLayout>

        <ImageView
            android:layout_width="162dp"
            android:id="@+id/search_light"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/ic_sysbar_lights_out_dot_large"
            android:scaleType="center"
            android:visibility="gone"
            />

        <com.android.systemui.statusbar.policy.DeadZone
            android:id="@+id/deadzone"
            android:layout_height="match_parent"
+20 −0
Original line number Diff line number Diff line
@@ -145,6 +145,16 @@
                />
        </LinearLayout>

        <ImageView
            android:layout_width="80dp"
            android:id="@+id/search_light"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/ic_sysbar_lights_out_dot_large"
            android:scaleType="center"
            android:visibility="gone"
            />

        <com.android.systemui.statusbar.policy.DeadZone
            android:id="@+id/deadzone"
            android:layout_height="match_parent"
@@ -279,6 +289,16 @@
                />
        </LinearLayout>

        <ImageView
            android:id="@+id/search_light"
            android:layout_height="80dp"
            android:layout_width="match_parent"
            android:layout_gravity="center_vertical"
            android:src="@drawable/ic_sysbar_lights_out_dot_large"
            android:scaleType="center"
            android:visibility="gone"
            />

        <com.android.systemui.statusbar.policy.DeadZone
            android:id="@+id/deadzone"
            android:layout_height="match_parent"
+11 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui;

import android.animation.LayoutTransition;
import android.app.ActivityManagerNative;
import android.app.ActivityOptions;
import android.app.SearchManager;
import android.content.ActivityNotFoundException;
@@ -24,6 +25,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.Vibrator;
import android.provider.Settings;
@@ -71,12 +73,21 @@ public class SearchPanelView extends FrameLayout implements
    }

    private void startAssistActivity() {
        if (!mBar.isDeviceProvisioned()) return;

        // Close Recent Apps if needed
        mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL);
        // Launch Assist
        Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
                .getAssistIntent(mContext, UserHandle.USER_CURRENT);
        if (intent == null) return;

        // Dismiss the keyguard if possible. XXX: TODO: invoke bouncer.
        try {
            ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity();
        } catch (RemoteException e) {
        }

        try {
            ActivityOptions opts = ActivityOptions.makeCustomAnimation(mContext,
                    R.anim.search_launch_enter, R.anim.search_launch_exit,
Loading