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

Commit 21d1bf1e authored by Kensuke Matsui's avatar Kensuke Matsui Committed by Fan Zhang
Browse files

Display network name in status bar

When config_showOperatorNameInStatusBar is true, the network name is
displayed in the status bar.
The user can turn on/off the feature from Settings app (Settings >
Display > Network name).

Fixes: 67620513
Test: manual - insert a valid SIM and go to the Home screen.

Change-Id: I6d03ec00a19e2f5e4c2d2918f1a7c33fdee00dd2
parent 4f8bd78b
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2017 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.
-->
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/operator_name_frame"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    >
    <com.android.systemui.statusbar.OperatorNameView
        android:id="@+id/operator_name"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:maxLength="20"
        android:gravity="center_vertical|start"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:singleLine="true" />
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
+5 −0
Original line number Diff line number Diff line
@@ -48,6 +48,11 @@
        android:paddingEnd="8dp"
        android:orientation="horizontal"
        >
        <ViewStub
            android:id="@+id/operator_name"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout="@layout/operator_name" />

        <!-- The alpha of this area is controlled from both PhoneStatusBarTransitions and
             PhoneStatusBar (DISABLE_NOTIFICATION_ICONS). -->
+3 −0
Original line number Diff line number Diff line
@@ -301,6 +301,9 @@
    <!-- Enable the default volume dialog -->
    <bool name="enable_volume_ui">true</bool>

    <!-- Whether to show operator name in the status bar -->
    <bool name="config_showOperatorNameInStatusBar">false</bool>

    <!-- Duration of the full carrier network change icon animation. -->
    <integer name="carrier_network_change_anim_time">3000</integer>

+4 −0
Original line number Diff line number Diff line
@@ -1738,6 +1738,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        mFailedAttempts.delete(sCurrentUser);
    }

    public ServiceState getServiceState(int subId) {
        return mServiceStates.get(subId);
    }

    public int getFailedUnlockAttempts(int userId) {
        return mFailedAttempts.get(userId, 0);
    }
+1 −0
Original line number Diff line number Diff line
@@ -37,4 +37,5 @@ public interface DemoMode {
    public static final String COMMAND_STATUS = "status";
    public static final String COMMAND_NOTIFICATIONS = "notifications";
    public static final String COMMAND_VOLUME = "volume";
    public static final String COMMAND_OPERATOR = "operator";
}
Loading