ApplicationFeatureProvider.java revision 62b96811c15d635a475e87ea22c4cedad1567bb6
1/* 2 * Copyright (C) 2016 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 17package com.android.settings.applications; 18 19import android.app.Fragment; 20import android.view.View; 21 22public interface ApplicationFeatureProvider { 23 24 /** 25 * Returns a new {@link AppHeaderController} instance to customize app header. 26 */ 27 AppHeaderController newAppHeaderController(Fragment fragment, View appHeader); 28 29 /** 30 * Asynchronously calculates the total number of apps installed on the device, across all users 31 * and managed profiles. 32 */ 33 void calculateNumberOfInstalledApps(NumberOfInstalledAppsCallback callback); 34 35 /** 36 * Callback that receives the total number of packages installed on the device. 37 */ 38 public interface NumberOfInstalledAppsCallback { 39 void onNumberOfInstalledAppsResult(int num); 40 } 41} 42