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

Commit 443f5e5b authored by Chaohui Wang's avatar Chaohui Wang Committed by Android (Google) Code Review
Browse files

Merge changes from topics "Spa-search", "Spa-search-converter" into main

* changes:
  Create Spa search converters
  Create Spa-search lib
parents 3c079626 c9f150aa
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2025 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 {
    default_team: "trendy_team_pixel_setting_exp",
}
+35 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2025 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 {
    default_applicable_licenses: ["frameworks_base_license"],
}

android_library {
    name: "Spa-search",
    srcs: ["src/**/*.kt"],
    use_resource_processor: true,
    static_libs: [
        "SettingsLib-search",
        "SpaLib",
        "Spa-search-protos-lite",
    ],
    kotlincflags: [
        "-Xjvm-default=all",
    ],
    sdk_version: "system_current",
    min_sdk_version: "31",
}
+18 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2025 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 package="com.android.settingslib.spa.search" />
+27 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2025 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 {
    default_applicable_licenses: ["frameworks_base_license"],
}

java_library {
    name: "Spa-search-protos-lite",
    proto: {
        type: "lite",
    },
    srcs: ["*.proto"],
}
+48 −0
Original line number Diff line number Diff line
// Copyright (C) 2025 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.

syntax = "proto2";

package com.android.settingslib.spa.search;

message SpaSearchLandingKey {
  oneof page {
    SpaSearchLandingSpaPage spa_page = 1;
    SpaSearchLandingFragment fragment = 2;
  }
}

message SpaSearchLandingSpaPage {
  /** The destination of SPA page. */
  optional string destination = 1;
}

message SpaSearchLandingFragment {
  /** The fragment class name. */
  optional string fragment_name = 1;

  /** The key of the preference to highlight the item. */
  optional string preference_key = 2;

  /** The arguments passed to the page. */
  map<string, BundleValue> arguments = 3;
}

/** A value in an Android Bundle. */
message BundleValue {
  oneof value {
    /** A 32-bit signed integer value. */
    int32 int_value = 1;
  }
}
Loading