150ce74b0963de66b294761c045428562d946b65aYuichi Araki/*
250ce74b0963de66b294761c045428562d946b65aYuichi Araki * Copyright (C) 2017 The Android Open Source Project
350ce74b0963de66b294761c045428562d946b65aYuichi Araki *
450ce74b0963de66b294761c045428562d946b65aYuichi Araki * Licensed under the Apache License, Version 2.0 (the "License");
550ce74b0963de66b294761c045428562d946b65aYuichi Araki * you may not use this file except in compliance with the License.
650ce74b0963de66b294761c045428562d946b65aYuichi Araki * You may obtain a copy of the License at
750ce74b0963de66b294761c045428562d946b65aYuichi Araki *
850ce74b0963de66b294761c045428562d946b65aYuichi Araki *      http://www.apache.org/licenses/LICENSE-2.0
950ce74b0963de66b294761c045428562d946b65aYuichi Araki *
1050ce74b0963de66b294761c045428562d946b65aYuichi Araki * Unless required by applicable law or agreed to in writing, software
1150ce74b0963de66b294761c045428562d946b65aYuichi Araki * distributed under the License is distributed on an "AS IS" BASIS,
1250ce74b0963de66b294761c045428562d946b65aYuichi Araki * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1350ce74b0963de66b294761c045428562d946b65aYuichi Araki * See the License for the specific language governing permissions and
1450ce74b0963de66b294761c045428562d946b65aYuichi Araki * limitations under the License.
1550ce74b0963de66b294761c045428562d946b65aYuichi Araki */
1650ce74b0963de66b294761c045428562d946b65aYuichi Araki
17ac5fe7c617c66850fff75a9fce9979c6e5674b0fAurimas Liutikaspackage androidx.transition;
1850ce74b0963de66b294761c045428562d946b65aYuichi Araki
1950ce74b0963de66b294761c045428562d946b65aYuichi Arakiimport android.graphics.Matrix;
2050ce74b0963de66b294761c045428562d946b65aYuichi Arakiimport android.os.Build;
2150ce74b0963de66b294761c045428562d946b65aYuichi Arakiimport android.view.View;
2250ce74b0963de66b294761c045428562d946b65aYuichi Arakiimport android.view.ViewGroup;
2350ce74b0963de66b294761c045428562d946b65aYuichi Araki
2450ce74b0963de66b294761c045428562d946b65aYuichi Arakiclass GhostViewUtils {
2550ce74b0963de66b294761c045428562d946b65aYuichi Araki
26fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton    static GhostViewImpl addGhost(View view, ViewGroup viewGroup, Matrix matrix) {
2750ce74b0963de66b294761c045428562d946b65aYuichi Araki        if (Build.VERSION.SDK_INT >= 21) {
28fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton            return GhostViewApi21.addGhost(view, viewGroup, matrix);
2950ce74b0963de66b294761c045428562d946b65aYuichi Araki        }
30fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton        return GhostViewApi14.addGhost(view, viewGroup);
3150ce74b0963de66b294761c045428562d946b65aYuichi Araki    }
3250ce74b0963de66b294761c045428562d946b65aYuichi Araki
3350ce74b0963de66b294761c045428562d946b65aYuichi Araki    static void removeGhost(View view) {
34fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton        if (Build.VERSION.SDK_INT >= 21) {
35fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton            GhostViewApi21.removeGhost(view);
36fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton        } else {
37fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton            GhostViewApi14.removeGhost(view);
38fc8fbd6f6d8ea918409ffd6269fafbea5cec7579Jake Wharton        }
3950ce74b0963de66b294761c045428562d946b65aYuichi Araki    }
4050ce74b0963de66b294761c045428562d946b65aYuichi Araki
410f4ca634bbc43ddff900c35f7d2a43b55d8c830dJake Wharton    private GhostViewUtils() {
420f4ca634bbc43ddff900c35f7d2a43b55d8c830dJake Wharton    }
4350ce74b0963de66b294761c045428562d946b65aYuichi Araki}
44