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

Commit 04b0840b authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Accessibility improvements in keyguard - add accessibility descriptions...

Merge "Accessibility improvements in keyguard - add accessibility descriptions to camera and search light - add new onClick handler to simplify launching search and camera - plumb camera launch through KeyguardService interface" into klp-dev
parents 318ae7bb 138f25d7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,4 +42,5 @@ interface IKeyguardService {
    oneway void setCurrentUser(int userId);
    oneway void showAssistant();
    oneway void dispatch(in MotionEvent event);
    oneway void launchCamera();
}
+8 −0
Original line number Diff line number Diff line
@@ -149,6 +149,14 @@
    <!-- Shown on transport control of lockscreen. Pressing button pauses playback -->
    <string name="keyguard_accessibility_transport_stop_description">Stop button</string>

    <!-- Accessibility description for when the device prompts the user to dismiss keyguard
         in order to complete an action. This will be followed by a message about the current
         security option (e.g. "Pattern unlock."). [CHAR LIMIT=NONE] -->
    <string name="keyguard_accessibility_show_bouncer">Unlock to continue</string>

    <!-- Accessibility description for when the bouncer prompt is dismissed. [CHAR LIMIT=NONE] -->
    <string name="keyguard_accessibility_hide_bouncer">Launch canceled</string>

    <!-- Password keyboard strings. Used by LockScreen and Settings --><skip />
    <!-- Label for "switch to symbols" key.  Must be short to fit on key! -->
    <string name="password_keyboard_label_symbol_key">\?123</string>
+11 −4
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.AlertDialog;
import android.app.PendingIntent;
import android.app.SearchManager;
import android.app.admin.DevicePolicyManager;
import android.appwidget.AppWidgetHost;
@@ -41,7 +40,6 @@ import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.media.RemoteControlClient;
import android.os.Bundle;
import android.os.Looper;
import android.os.Parcel;
import android.os.Parcelable;
@@ -49,11 +47,9 @@ import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Slog;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -206,6 +202,13 @@ public class KeyguardHostView extends KeyguardViewBase {
        }
    }

    public void announceCurrentSecurityMethod() {
        View v = (View) getSecurityView(mCurrentSecuritySelection);
        if (v != null) {
            v.announceForAccessibility(v.getContentDescription());
        }
    }

    private void getInitialTransportState() {
        DisplayClientState dcs = KeyguardUpdateMonitor.getInstance(mContext)
                .getCachedDisplayClientState();
@@ -1663,4 +1666,8 @@ public class KeyguardHostView extends KeyguardViewBase {
        mAppWidgetContainer.handleExternalCameraEvent(event);
    }

    public void launchCamera() {
        mActivityLauncher.launchCamera(getHandler(), null);
    }

}
+4 −0
Original line number Diff line number Diff line
@@ -137,6 +137,10 @@ public class KeyguardService extends Service {
            checkPermission();
            mKeyguardViewMediator.dispatch(event);
        }
        public void launchCamera() {
            checkPermission();
            mKeyguardViewMediator.launchCamera();
        }
    };

}
+6 −0
Original line number Diff line number Diff line
@@ -506,4 +506,10 @@ public class KeyguardViewManager {
            mKeyguardView.dispatch(event);
        }
    }

    public void launchCamera() {
        if (mKeyguardView != null) {
            mKeyguardView.launchCamera();
        }
    }
}
Loading