1/*
2 * Copyright (C) 2017 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.launcher3.discovery;
18
19import android.content.Intent;
20import android.graphics.Bitmap;
21
22/**
23 * This class represents the model for a discovered app via app discovery.
24 * It holds all information for one result retrieved from an app discovery service.
25 */
26public class AppDiscoveryItem {
27
28    public final String packageName;
29    public final boolean isInstantApp;
30    public final boolean isRecent;
31    public final float starRating;
32    public final long reviewCount;
33    public final Intent launchIntent;
34    public final Intent installIntent;
35    public final CharSequence title;
36    public final String publisher;
37    public final String price;
38    public final Bitmap bitmap;
39
40    public AppDiscoveryItem(String packageName,
41                            boolean isInstantApp,
42                            boolean isRecent,
43                            float starRating,
44                            long reviewCount,
45                            CharSequence title,
46                            String publisher,
47                            Bitmap bitmap,
48                            String price,
49                            Intent launchIntent,
50                            Intent installIntent) {
51        this.packageName = packageName;
52        this.isInstantApp = isInstantApp;
53        this.isRecent = isRecent;
54        this.starRating = starRating;
55        this.reviewCount = reviewCount;
56        this.launchIntent = launchIntent;
57        this.installIntent = installIntent;
58        this.title = title;
59        this.publisher = publisher;
60        this.price = price;
61        this.bitmap = bitmap;
62    }
63
64}
65