1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.wallpaper.picker.preview.ui.util
18 
19 import android.app.Activity
20 import com.android.wallpaper.picker.preview.ui.view.ImageEffectDialog
21 
22 /** The util to create dialogs used for the image effect. */
23 interface ImageEffectDialogUtil {
24 
25     /**
26      * The dialog should show when finding that the wifi connection is not available to download the
27      * ML model for effect generation. We should either continue to download with mobile connection
28      * or cancel downloading.
29      */
createConfirmDownloadDialognull30     fun createConfirmDownloadDialog(
31         activity: Activity,
32     ): ImageEffectDialog
33 
34     /**
35      * The dialog should show when existing the preview screen while the ML model is being
36      * downloaded. We can continue to leave the preview screen with interrupting the download, or
37      * cancel to stay on the preview screen.
38      */
39     fun createConfirmExitDialog(
40         activity: Activity,
41     ): ImageEffectDialog
42 }
43