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

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

Merge "Enable Kotlin for Settings App" into tm-qpr-dev

parents 7b75a759 9ec6f0e4
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -35,6 +35,15 @@ java_library {
    ],
}

java_library {
    name: "Settings-change-ids",
    srcs: ["src/com/android/settings/ChangeIds.java"],
    libs: [
        "app-compat-annotations",
    ],
}


// Build the Settings APK
android_library {
    name: "Settings-core",
@@ -77,18 +86,18 @@ android_library {
        "lottie",
        "WifiTrackerLib",
        "SettingsLibActivityEmbedding",
        "Settings-change-ids",
    ],

    libs: [
        "telephony-common",
        "ims-common",
        "app-compat-annotations",
    ],
}

platform_compat_config {
    name: "settings-platform-compat-config",
    src: ":Settings-core",
    src: ":Settings-change-ids",
    system_ext_specific: true,
}

@@ -126,7 +135,7 @@ filegroup {
// over all the sources together.
filegroup {
    name: "Settings_srcs",
    srcs: ["src/**/*.java"],
    srcs: ["src/**/*.java", "src/**/*.kt"],
}

filegroup {
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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.settings;

import android.compat.annotation.ChangeId;
import android.compat.annotation.LoggingOnly;

/**
 * All the {@link ChangeId} used for Settings App.
 */
public class ChangeIds {
    /**
     * Intents with action {@code android.settings.MANAGE_APP_OVERLAY_PERMISSION}
     * and data URI scheme {@code package} don't go to the app-specific screen for managing the
     * permission anymore. Instead, they redirect to this screen for managing all the apps that have
     * requested such permission.
     */
    @ChangeId
    @LoggingOnly
    public static final long CHANGE_RESTRICT_SAW_INTENT = 135920175L;
}
+1 −12
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settings.applications.manageapplications;

import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;

import static com.android.settings.ChangeIds.CHANGE_RESTRICT_SAW_INTENT;
import static com.android.settings.applications.manageapplications.AppFilterRegistry.FILTER_APPS_ALL;
import static com.android.settings.applications.manageapplications.AppFilterRegistry.FILTER_APPS_BLOCKED;
import static com.android.settings.applications.manageapplications.AppFilterRegistry.FILTER_APPS_DISABLED;
@@ -37,8 +38,6 @@ import android.app.Activity;
import android.app.ActivityManager;
import android.app.settings.SettingsEnums;
import android.app.usage.IUsageStatsManager;
import android.compat.annotation.ChangeId;
import android.compat.annotation.LoggingOnly;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
@@ -190,16 +189,6 @@ public class ManageApplications extends InstrumentedFragment
    public static final int STORAGE_TYPE_DEFAULT = 0; // Show all apps that are not categorized.
    public static final int STORAGE_TYPE_LEGACY = 1;  // Show apps even if they can be categorized.

    /**
     * Intents with action {@code android.settings.MANAGE_APP_OVERLAY_PERMISSION}
     * and data URI scheme {@code package} don't go to the app-specific screen for managing the
     * permission anymore. Instead, they redirect to this screen for managing all the apps that have
     * requested such permission.
     */
    @ChangeId
    @LoggingOnly
    private static final long CHANGE_RESTRICT_SAW_INTENT = 135920175L;

    // sort order
    @VisibleForTesting
    int mSortOrder = R.id.sort_order_alpha;