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

Commit 2313bfa9 authored by Zoey Chen's avatar Zoey Chen
Browse files

[ProviderModel] Add InternetDialogController for internet dialog am: 7b5e2982

Bug: 197611282
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15544660

Change-Id: I2d35add10ef911aaa6db47058ecd9287dcf70b97
Merged-In: I37a423f31ae80963147758160ac0234ae17469f9
parents 03adaa22 7b5e2982
Loading
Loading
Loading
Loading
+34 −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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0"
    android:tint="?android:attr/colorControlNormal">
    <path
        android:fillColor="#FF000000"
        android:pathData="M2,22l16,0l0,-2l-11,0l13,-13l0,1l2,0l0,-6z"
        android:strokeAlpha="0.3"
        android:fillAlpha="0.3"/>
    <path
        android:fillColor="#FF000000"
        android:pathData="M20,10h2v8h-2z"/>
    <path
        android:fillColor="#FF000000"
        android:pathData="M20,20h2v2h-2z"/>
</vector>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -1600,4 +1600,7 @@
    <dimen name="ongoing_call_chip_corner_radius">28dp</dimen>

    <dimen name="drag_and_drop_icon_size">70dp</dimen>

    <!-- Signal icon in internet dialog -->
    <dimen name="signal_strength_icon_size">24dp</dimen>
</resources>
+33 −0
Original line number Diff line number Diff line
@@ -2989,4 +2989,37 @@

    <!-- Content description for a chip in the status bar showing that the user is currently on a phone call. [CHAR LIMIT=NONE] -->
    <string name="ongoing_phone_call_content_description">Ongoing phone call</string>

    <!-- Provider Model: Title of the airplane mode in the internet dialog. [CHAR LIMIT=50] -->
    <string name="airplane_mode">Airplane mode</string>
    <!-- Provider Model: Default title of the mobile network in the mobile layout. [CHAR LIMIT=50] -->
    <string name="mobile_data_settings_title">Mobile data</string>
    <!-- Provider Model: Summary text separator for preferences including a short description
         (eg. "Connected / 5G"). [CHAR LIMIT=50] -->
    <string name="preference_summary_default_combination"><xliff:g id="state" example="Connected">%1$s</xliff:g> / <xliff:g id="networkMode" example="LTE">%2$s</xliff:g></string>
    <!-- Provider Model:
         Summary indicating that a SIM has an active mobile data connection [CHAR LIMIT=50] -->
    <string name="mobile_data_connection_active">Connected</string>
    <!-- Provider Model:
     Summary indicating that a SIM has no mobile data connection [CHAR LIMIT=50] -->
    <string name="mobile_data_off_summary">Internet won\u0027t auto\u2011connect</string>
    <!-- Provider Model:
     Summary indicating that a active SIM and no network available [CHAR LIMIT=50] -->
    <string name="mobile_data_no_connection">No connection</string>
    <!-- Provider Model: Summary indicating that no other networks available [CHAR LIMIT=50] -->
    <string name="non_carrier_network_unavailable">No other networks available</string>
    <!-- Provider Model: Summary indicating that no networks available [CHAR LIMIT=50] -->
    <string name="all_network_unavailable">No networks available</string>
    <!-- Provider Model: Panel title text for turning on the Wi-Fi networks. [CHAR LIMIT=40] -->
    <string name="turn_on_wifi">Wi\u2011Fi</string>
    <!-- Provider Model: Title for detail page of wifi network [CHAR LIMIT=30] -->
    <string name="pref_title_network_details" msgid="7329759534269363308">"Network details"</string>
    <!-- Provider Model: Panel subtitle for tapping a network to connect to internet. [CHAR LIMIT=60] -->
    <string name="tap_a_network_to_connect">Tap a network to connect</string>
    <!-- Provider Model: Wi-Fi settings. text displayed when Wi-Fi is on and network list is empty [CHAR LIMIT=50]-->
    <string name="wifi_empty_list_wifi_on">Searching for networks\u2026</string>
    <!-- Provider Model: Failure notification for connect -->
    <string name="wifi_failed_connect_message">Failed to connect to network</string>
    <!-- Provider Model: Title to see all the networks [CHAR LIMIT=50] -->
    <string name="see_all_networks">See all</string>
</resources>
+851 −0

File added.

Preview size limit exceeded, changes collapsed.

+14 −0
Original line number Diff line number Diff line
package com.android.systemui.qs.tiles.dialog;

import android.content.Context;
import android.util.FeatureFlagUtils;

public class InternetDialogUtil {

    public static boolean isProviderModelEnabled(Context context) {
        if (context == null) {
            return false;
        }
        return FeatureFlagUtils.isEnabled(context, FeatureFlagUtils.SETTINGS_PROVIDER_MODEL);
    }
}
Loading