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

Commit c2dc611a authored by Aleksandr Litovchenko's avatar Aleksandr Litovchenko Committed by Android (Google) Code Review
Browse files

Merge "Upstream Wear Keyguard changes"

parents 0edef3c3 38149402
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -17058,6 +17058,15 @@ public final class Settings {
             */
            public static final String CLOCKWORK_SYSUI_MAIN_ACTIVITY =
                    "clockwork_sysui_main_activity";
            /**
             * Setting to disable power button long press launching Assistant. It's boolean, i.e.
             * enabled = 1, disabled = 0. By default, this setting is enabled.
             *
             * @hide
             */
            public static final String CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED =
                    "clockwork_long_press_to_assistant_enabled";
        }
    }
+15 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package com.android.internal.policy;

import android.content.Intent;
import com.android.internal.policy.IKeyguardDrawnCallback;
import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.policy.IKeyguardStateCallback;
@@ -113,7 +114,20 @@ oneway interface IKeyguardService {

    /**
     * Notifies the Keyguard that the power key was pressed while locked and launched Home rather
     * than putting the device to sleep or waking up.
     * than putting the device to sleep or waking up. Note that it's called only if the device is
     * interactive.
     */
    void onShortPowerPressedGoHome();

    /**
     * Notifies the Keyguard that it needs to bring up a bouncer and then launch the intent as soon
     * as user unlocks the watch.
     */
    void dismissKeyguardToLaunch(in Intent intentToLaunch);

    /**
     * Notifies the Keyguard that a key was pressed while locked so the Keyguard can handle it.
     * Note that it's called only if the device is interactive.
     */
    void onSystemKeyPressed(int keycode);
}
+1 −0
Original line number Diff line number Diff line
@@ -657,6 +657,7 @@ public class SettingsBackupTest {
                    Settings.Global.Wearable.WRIST_ORIENTATION_MODE,
                    Settings.Global.Wearable.CLOCKWORK_SYSUI_PACKAGE,
                    Settings.Global.Wearable.CLOCKWORK_SYSUI_MAIN_ACTIVITY,
                    Settings.Global.Wearable.CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED,
                    Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_SET_BY_USER);

    private static final Set<String> BACKUP_DENY_LIST_SECURE_SETTINGS =
+12 −0
Original line number Diff line number Diff line
@@ -583,6 +583,18 @@ public class KeyguardService extends Service {
            checkPermission();
            mKeyguardViewMediator.onShortPowerPressedGoHome();
        }

        @Override
        public void dismissKeyguardToLaunch(Intent intentToLaunch) {
            checkPermission();
            mKeyguardViewMediator.dismissKeyguardToLaunch(intentToLaunch);
        }

        @Override
        public void onSystemKeyPressed(int keycode) {
            checkPermission();
            mKeyguardViewMediator.onSystemKeyPressed(keycode);
        }
    };
}
+8 −0
Original line number Diff line number Diff line
@@ -2750,6 +2750,14 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
        // do nothing
    }

    public void dismissKeyguardToLaunch(Intent intentToLaunch) {
        // do nothing
    }

    public void onSystemKeyPressed(int keycode) {
        // do nothing
    }

    public ViewMediatorCallback getViewMediatorCallback() {
        return mViewMediatorCallback;
    }
Loading