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

Commit c6a359a2 authored by Trevor Black's avatar Trevor Black Committed by Android (Google) Code Review
Browse files

Merge "Add Extra App Info into Settings App UI." into sc-dev

parents f2bbadf5 d0d796c9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -12849,4 +12849,7 @@
    <string name="enable_2g_title">Allow 2G</string>
    <!-- Title for toggle if user wants to enable 2G [CHAR LIMIT=NONE] -->
    <string name="enable_2g_summary">Use 2G cellular connections. For emergency calls, 2G is always turned on.</string>
    <!-- Label for extra app info settings for a specific app [CHAR LIMIT=40] -->
    <string name="extra_app_info_label" translatable="false"></string>
</resources>
+5 −0
Original line number Diff line number Diff line
@@ -80,6 +80,11 @@
        android:summary="@string/summary_placeholder"
        settings:controller="com.android.settings.applications.appinfo.AppDataUsagePreferenceController" />

    <Preference
        android:key="extra_app_info_settings"
        android:title="@string/extra_app_info_label"
        settings:controller="com.android.settings.applications.appinfo.ExtraAppInfoPreferenceController" />

    <Preference
        android:key="time_spent_in_app"
        android:title="@string/time_spent_in_app_pref_title"
+3 −0
Original line number Diff line number Diff line
@@ -166,6 +166,9 @@ public class AppInfoDashboardFragment extends DashboardFragment
        use(AppStoragePreferenceController.class).setParentFragment(this);
        use(AppVersionPreferenceController.class).setParentFragment(this);
        use(InstantAppDomainsPreferenceController.class).setParentFragment(this);
        if (FeatureFlagUtils.isEnabled(context, FeatureFlags.SILKY_HOME)) {
            use(ExtraAppInfoPreferenceController.class).setPackageName(packageName);
        }

        final WriteSystemSettingsPreferenceController writeSystemSettings =
                use(WriteSystemSettingsPreferenceController.class);
+37 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.applications.appinfo;

import android.content.Context;

/**
 * Provider for Extra App Info related feature
 */
public interface ExtraAppInfoFeatureProvider {
    /** Returns true if the feature is supported. */
    boolean isSupported(Context context);

    /**
     * Launch ExtraAppInfoSettings
     */
    void launchExtraAppInfoSettings(Context context);

    /**
     * Sets the package name
     */
    void setPackageName(String packageName);
}
+40 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.applications.appinfo;

import android.content.Context;

/**
 * Provider for Extra App Info related feature
 */
public class ExtraAppInfoFeatureProviderImpl implements
        ExtraAppInfoFeatureProvider {
    @Override
    public boolean isSupported(Context context) {
        return false;
    }

    @Override
    public void launchExtraAppInfoSettings(Context context) {
        return;
    }

    @Override
    public void setPackageName(String packageName) {
        return;
    }
}
Loading