Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6e5577e authored by Mario Bertschler's avatar Mario Bertschler Committed by android-build-merger
Browse files

Merge "App discovery integration in All Apps search" into ub-launcher3-dorval

am: 86515dd1

Change-Id: I9c912d0ccec6c999547b1bce1f3e3b0b430a147f
parents d4d17142 86515dd1
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project

   Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="@dimen/badge_size"
    android:height="@dimen/badge_size"
    android:viewportWidth="18"
    android:viewportHeight="18">

    <path
        android:fillColor="@android:color/black"
        android:fillType="evenOdd"
        android:strokeWidth="1"
        android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
    <path
        android:fillColor="@android:color/white"
        android:fillType="evenOdd"
        android:strokeWidth="1"
        android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
    <path
        android:fillColor="@android:color/white"
        android:fillType="evenOdd"
        android:strokeWidth="1"
        android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
    <path
        android:fillColor="@android:color/black"
        android:fillAlpha="0.87"
        android:fillType="evenOdd"
        android:strokeWidth="1"
        android:pathData="M 6 10.4123279 L 8.63934949 10.4123279 L 8.63934949 15.6 L 12.5577168 7.84517705 L 9.94547194 7.84517705 L 9.94547194 2 Z" />
</vector>
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="12dp"
    android:height="12dp"
    android:viewportWidth="12"
    android:viewportHeight="12">

    <path
        android:fillColor="#FB8C00"
        android:fillType="evenOdd"
        android:strokeWidth="1"
        android:pathData="M 9.76511755 11.9348136 L 8.33665684 7.16088817 L 12.080006 4.41656311 L 7.49967039 4.41856896 L 6.03138903 0 L 4.57932894 4.41856896 L -1.34115008e-16 4.41656311 L 3.72612122 7.16088817 L 2.29967385 11.9348136 L 6.03138903 8.82574452 Z" />
</vector>
 No newline at end of file
+111 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.android.launcher3.discovery.AppDiscoveryItemView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:background="?android:selectableItemBackground">

    <ImageView
        android:id="@+id/image"
        android:layout_width="56dp"
        android:layout_height="56dp"
        android:padding="8dp"
        android:scaleType="fitCenter"/>

    <ImageView
        android:id="@+id/badge"
        android:layout_width="16dp"
        android:layout_height="16dp"
        android:scaleType="fitCenter"
        android:src="@drawable/ic_instant_app"
        android:layout_marginRight="6dp"
        android:layout_marginBottom="6dp"
        android:layout_alignRight="@+id/image"
        android:layout_alignBottom="@+id/image"
        android:clickable="false"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_centerVertical="true"
        android:layout_toRightOf="@id/image">

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColor="?android:textColorSecondary"
            android:textSize="15sp"/>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <TextView
                android:id="@+id/rating"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="?android:textColorSecondary"
                android:textSize="14sp"
                android:layout_gravity="center_vertical"/>

            <com.android.launcher3.discovery.RatingView
                android:id="@+id/rating_view"
                android:layout_width="80dp"
                android:layout_height="16dp"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                android:layout_gravity="center_vertical"/>

            <TextView
                android:id="@+id/review_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:textColor="?android:textColorHint"
                android:textSize="14sp"
                android:layout_gravity="center_vertical"/>

            <Space
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="1"/>

            <TextView
                android:id="@+id/price"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="?android:textColorHint"
                android:textSize="14sp"
                android:layout_marginRight="12dp"
                android:textAllCaps="true"/>
        </LinearLayout>
    </LinearLayout>

    <ImageView
        android:importantForAccessibility="no"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
        android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
        android:src="@drawable/all_apps_divider"
        android:scaleType="fitXY"
        android:focusable="false" />
</com.android.launcher3.discovery.AppDiscoveryItemView>
 No newline at end of file
+40 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="20dp"
    android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
    android:paddingRight="@dimen/container_fastscroll_thumb_max_width">

    <ProgressBar
        android:id="@+id/loadingProgressBar"
        style="@android:style/Widget.Material.ProgressBar.Horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="6dp"
        android:maxHeight="6dp"
        android:indeterminate="true"
        android:layout_gravity="center"/>

    <View
        android:id="@+id/loadedDivider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@drawable/all_apps_divider"
        android:layout_gravity="center"
        android:visibility="invisible"/>

</FrameLayout>
 No newline at end of file
+1 −5
Original line number Diff line number Diff line
@@ -21,14 +21,11 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.LauncherActivityInfo;
import android.os.UserHandle;
import android.util.Log;

import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.PackageManagerHelper;

import java.util.ArrayList;

/**
 * Represents an app in AllAppsView.
 */
@@ -44,7 +41,7 @@ public class AppInfo extends ItemInfoWithIcon {
    /**
     * {@see ShortcutInfo#isDisabled}
     */
    int isDisabled = ShortcutInfo.DEFAULT;
    public int isDisabled = ShortcutInfo.DEFAULT;

    public AppInfo() {
        itemType = LauncherSettings.BaseLauncherColumns.ITEM_TYPE_SHORTCUT;
@@ -83,7 +80,6 @@ public class AppInfo extends ItemInfoWithIcon {
        title = Utilities.trim(info.title);
        intent = new Intent(info.intent);
        isDisabled = info.isDisabled;
        iconBitmap = info.iconBitmap;
    }

    @Override
Loading