blob: ded0286d16b13c6e1f31251557303b3f169d723c [file] [log] [blame]
Daniel Nishi31027da2017-01-19 14:03:57 -08001/*
Fan Zhanga8cac7a2017-10-11 16:44:41 -07002 * Copyright (C) 2015 The Android Open Source Project
Daniel Nishi31027da2017-01-19 14:03:57 -08003 *
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
Fan Zhanga8cac7a2017-10-11 16:44:41 -070014 * limitations under the License.
Daniel Nishi31027da2017-01-19 14:03:57 -080015 */
16
Fan Zhanga8cac7a2017-10-11 16:44:41 -070017package com.android.settings.applications.manageapplications;
Daniel Nishi31027da2017-01-19 14:03:57 -080018
tmfang99cc23d2018-06-26 19:01:57 +080019import androidx.fragment.app.Fragment;
Daniel Nishi31027da2017-01-19 14:03:57 -080020
21/**
22 * FileViewHolderController handles adapting the AppViewHolder to work as a general purpose
23 * storage categorization preference in the ManageApplications view.
24 */
25public interface FileViewHolderController {
26 /**
27 * Begins a synchronous query for statistics for the files.
28 */
29 void queryStats();
30
31 /**
32 * Returns if the preference should be shown.
33 */
34 boolean shouldShow();
35
36 /**
37 * Initializes the view within an AppViewHolder.
Fan Zhang78369d92017-10-12 11:09:24 -070038 *
Daniel Nishi31027da2017-01-19 14:03:57 -080039 * @param holder The holder to use to initialize.
40 */
Fan Zhang78369d92017-10-12 11:09:24 -070041 void setupView(ApplicationViewHolder holder);
Daniel Nishi31027da2017-01-19 14:03:57 -080042
43 /**
44 * Handles the behavior when the view is clicked.
Fan Zhang78369d92017-10-12 11:09:24 -070045 *
Daniel Nishi31027da2017-01-19 14:03:57 -080046 * @param fragment Fragment where the click originated.
47 */
48 void onClick(Fragment fragment);
49}