fix shortcut handling

    Bugs: 3400078
    	  3270434
	  3368141
	  3381411

    Fixed controller to check for menu & ctrl keys for shortcuts
    Changed focus handling in url bar
    Keyboard focus transitions are not 100% working yet, but it's possible
    to navigate to all the elements

Change-Id: I514d85a37dae2589e3ce1ecb18c7fc0bf4e715f3
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index c00e1f5..990d68f 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -85,6 +85,7 @@
 
     private final Paint mActiveShaderPaint = new Paint();
     private final Paint mInactiveShaderPaint = new Paint();
+    private final Paint mFocusPaint = new Paint();
     private final Matrix mActiveMatrix = new Matrix();
     private final Matrix mInactiveMatrix = new Matrix();
 
@@ -131,6 +132,9 @@
         mInactiveShaderPaint.setStyle(Paint.Style.FILL);
         mInactiveShaderPaint.setAntiAlias(true);
 
+        mFocusPaint.setStyle(Paint.Style.STROKE);
+        mFocusPaint.setAntiAlias(true);
+        mFocusPaint.setColor(res.getColor(R.color.tabFocusHighlight));
     }
 
     void setUseQuickControls(boolean useQuickControls) {
@@ -399,6 +403,8 @@
             lp.width = selected ? mTabWidthSelected : mTabWidthUnselected;
             lp.height =  LayoutParams.MATCH_PARENT;
             setLayoutParams(lp);
+            setFocusable(!selected);
+            postInvalidate();
         }
 
         void setDisplayTitle(String title) {
@@ -479,6 +485,9 @@
             matrix.setTranslate(-left, 0.0f);
             (mSelected ? mActiveShader : mInactiveShader).setLocalMatrix(matrix);
             canvas.drawPath(clipPath, paint);
+            if (isFocused()) {
+                canvas.drawPath(clipPath, mFocusPaint);
+            }
         }
 
         private void setTabPath(Path path, int l, int t, int r, int b) {