diff options
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/view/AccessibilityManagerInternal.java | 31 | ||||
-rw-r--r-- | core/java/com/android/internal/app/PlatLogoActivity.java | 24 |
2 files changed, 24 insertions, 31 deletions
diff --git a/core/java/android/view/AccessibilityManagerInternal.java b/core/java/android/view/AccessibilityManagerInternal.java deleted file mode 100644 index 7bb2dc5..0000000 --- a/core/java/android/view/AccessibilityManagerInternal.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 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. - */ - -package android.view; - -/** - * Accessibility manager local system service interface. - * - * @hide Only for use within the system server. - */ -public abstract class AccessibilityManagerInternal { - - /** - * Queries if the accessibility manager service permits setting - * a non-default encryption password. - */ - public abstract boolean isNonDefaultEncryptionPasswordAllowed(); -} diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java index f92fd55..80bc5fe 100644 --- a/core/java/com/android/internal/app/PlatLogoActivity.java +++ b/core/java/com/android/internal/app/PlatLogoActivity.java @@ -36,6 +36,7 @@ import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; import android.view.Gravity; +import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; @@ -54,6 +55,7 @@ public class PlatLogoActivity extends Activity { }; FrameLayout mLayout; int mTapCount; + int mKeyCount; PathInterpolator mInterpolator = new PathInterpolator(0f, 0f, 0.5f, 1f); static int newColorIndex() { @@ -203,6 +205,28 @@ public class PlatLogoActivity extends Activity { } }); + // Enable hardware keyboard input for TV compatibility. + im.setFocusable(true); + im.requestFocus(); + im.setOnKeyListener(new View.OnKeyListener() { + @Override + public boolean onKey(View v, int keyCode, KeyEvent event) { + if (keyCode != KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) { + ++mKeyCount; + if (mKeyCount > 2) { + if (mTapCount > 5) { + im.performLongClick(); + } else { + im.performClick(); + } + } + return true; + } else { + return false; + } + } + }); + mLayout.addView(im, new FrameLayout.LayoutParams(size, size, Gravity.CENTER)); im.animate().scaleX(0.3f).scaleY(0.3f) |