diff options
author | 2014-10-09 12:01:38 +0000 | |
---|---|---|
committer | 2014-10-09 12:01:38 +0000 | |
commit | 8e5dac104f831c27076b840d36c3abd259b666a4 (patch) | |
tree | ee603b62f4e2e92f8c960dbee695a06f7a2be95b /java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java | |
parent | 45110a7bcf6daa20ebb04e34045a63b8c9985705 (diff) | |
parent | 15480481be790c913b0117d0841565efd399cd01 (diff) | |
download | latinime-8e5dac104f831c27076b840d36c3abd259b666a4.tar.gz latinime-8e5dac104f831c27076b840d36c3abd259b666a4.tar.xz latinime-8e5dac104f831c27076b840d36c3abd259b666a4.zip |
am 15480481: Add keyboard shadow
* commit '15480481be790c913b0117d0841565efd399cd01':
Add keyboard shadow
Diffstat (limited to 'java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java b/java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java new file mode 100644 index 000000000..52b8b74e8 --- /dev/null +++ b/java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java @@ -0,0 +1,42 @@ +/* + * 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 com.android.inputmethod.compat; + +import android.inputmethodservice.InputMethodService; +import android.view.View; + +public class ViewOutlineProviderCompatUtils { + private ViewOutlineProviderCompatUtils() { + // This utility class is not publicly instantiable. + } + + public interface InsetsUpdater { + public void setInsets(final InputMethodService.Insets insets); + } + + private static final InsetsUpdater EMPTY_INSETS_UPDATER = new InsetsUpdater() { + @Override + public void setInsets(final InputMethodService.Insets insets) {} + }; + + public static InsetsUpdater setInsetsOutlineProvider(final View view) { + if (BuildCompatUtils.EFFECTIVE_SDK_INT < BuildCompatUtils.VERSION_CODES_LXX) { + return EMPTY_INSETS_UPDATER; + } + return ViewOutlineProviderCompatUtilsLXX.setInsetsOutlineProvider(view); + } +} |