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

Commit 16532d07 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Setup frameworks/libs/systemui/searchuilib for AA+Search

Bug: 162234997
Test: system image builds, search_ui lib builds
Change-Id: If958ac3eb94c9a52ab3ba691c998f48ae846b11e
parent a54e2185
Loading
Loading
Loading
Loading

searchuilib/Android.bp

0 → 100644
+24 −0
Original line number Diff line number Diff line
// Copyright (C) 2020 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.

android_library {
    name: "search_ui",

    sdk_version: "system_current",
    min_sdk_version: "system_current",

    srcs: [
        "src/**/*.java",
    ],
}
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2020 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.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.app.search">
</manifest>
+37 −0
Original line number Diff line number Diff line
apply plugin: 'com.android.library'

android {
    compileSdkVersion COMPILE_SDK
    buildToolsVersion BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion 25
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }

    sourceSets {
        main {
            java.srcDirs = ['src']
            manifest.srcFile 'AndroidManifest.xml'
        }
    }

    lintOptions {
        abortOnError false
    }

    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation "androidx.core:core:${ANDROID_X_VERSION}"
}
+55 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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.
 */

package com.android.app.search;

/**
 * Constants to be used with {@link android.app.search.SearchTarget}.
 */
public class LayoutType {

    //     ------
    //    | icon |
    //     ------
    //      text
    //
    public static final String ICON_SINGLE_VERTICAL_TEXT = "icon";

    //     ------
    //    | icon | text
    //     ------
    public static final String ICON_SINGLE_HORIZONTAL_TEXT = "icon_text_row";

    //     ------               ------   ------
    //    | icon | text        | icon | | icon |
    //     ------               ------   ------
    public static final String ICON_INLINE_ICONS = "icon_text_icons";

    //     ------
    //    |      | text1
    //    | icon | text2
    //     ------
    public static final String ICON_DOUBLE_HORIZONTAL_TEXT = "icon_texts_row";

    // TODO: add diagram
    public static final String ICON_DOUBLE_HORIZONTAL_TEXT_BUTTON =
        "icon_texts_button";

    // TODO: add diagram
    public static final String TEXT_HEADER = "header";

    // TODO: replace the plugin item types with these string constants
}
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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.
 */

package com.android.app.search;

/**
 * Constants to be used with {@link android.app.search.SearchContext} and
 * {@link android.app.search.SearchInfo}.
 */
public class ResultType {

    public static final int APPLICATION = 1 << 0;
    public static final int SHORTCUT = 1 << 1;
    public static final int PEOPLE = 1 << 2;
    public static final int ACTION = 1 << 3;
    public static final int SETTING = 1 << 4;
    public static final int SCREENSHOT = 1 << 5;
    public static final int TIPS = 1 << 2;
    public static final int WIDGETS = 1 << 3;
}