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

Commit b98463f8 authored by repo sync's avatar repo sync Committed by Irfan Sheriff
Browse files

Updated: Wi-Fi p2p initial UI implementation

Change-Id: If60f42f76fa07a868d2e11b012b4697252c69f5f
parent e707d8b4
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -270,6 +270,24 @@
                android:value="com.android.settings.Settings$WirelessSettingsActivity" />
        </activity-alias>

        <activity android:name="Settings$WifiP2pSettingsActivity"
                android:clearTaskOnLaunch="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.VOICE_LAUNCH" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.WifiP2pSettings" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/wireless_settings" />
            <meta-data android:name="com.android.settings.PARENT_FRAGMENT_TITLE"
                android:resource="@string/wireless_networks_settings_title" />
            <meta-data android:name="com.android.settings.PARENT_FRAGMENT_CLASS"
                android:value="com.android.settings.Settings$WirelessSettingsActivity" />
        </activity>


        <activity android:name="Settings$VpnSettingsActivity"
                android:label="@string/vpn_settings_title"
                android:clearTaskOnLaunch="true">
+88 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="300sp"
         android:layout_height="wrap_content">

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="8dip"
            android:orientation="vertical">

        <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical" />

            <TextView
                    style="?android:attr/textAppearanceSmall"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dip"
                    android:text="@string/wifi_p2p_device_info" />

            <TextView android:id="@+id/device_name"
                    style="?android:attr/textAppearanceMedium"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dip" />

            <TextView android:id="@+id/device_address"
                    style="?android:attr/textAppearanceMedium"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dip" />

            <TextView
                    style="?android:attr/textAppearanceSmall"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dip"
                    android:text="@string/wifi_p2p_wps_setup" />

            <Spinner android:id="@+id/wps_setup"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:prompt="@string/wifi_p2p_wps_setup"
                    android:entries="@array/wifi_p2p_wps_setup" />

           <LinearLayout android:id="@+id/wps_pin_entry"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:visibility="gone">

                <TextView
                    style="@style/wifi_item_label"
                    android:text="@string/wifi_p2p_wps_pin" />

                <EditText android:id="@+id/wps_pin"
                    style="@style/wifi_item_content"
                    android:singleLine="true"
                    android:inputType="textPassword" />
            </LinearLayout>


            <CheckBox android:id="@+id/persist_network"
                    style="?android:attr/textAppearanceSmall"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/wifi_p2p_persist_network" />

   </LinearLayout>
</ScrollView>
+22 −0
Original line number Diff line number Diff line
@@ -324,6 +324,28 @@
        <item>TTLS</item>
    </string-array>

   <!-- Wi-Fi WPS setup for p2p connections.  -->
   <!-- Note that adding/removing/moving the items will need wifi settings code change. -->
    <string-array name="wifi_p2p_wps_setup">
        <!-- Push button based configuration involves pushing a button on two connecting devices [CHAR LIMIT=30]-->
        <item>Push button</item>
        <!-- This involves entering a pin obtained from a peer device [CHAR LIMIT=30] -->
        <item>Pin from peer device</item>
        <!-- This involves generating a pin from this device [CHAR LIMIT=20] -->
        <item>Pin from this device</item>
    </string-array>

    <!-- Match this with the order of WifiP2pDevice.Status -->
    <!-- Wi-Fi p2p settings device status message -->
    <string-array name="wifi_p2p_status">
        <item>Connected</item>
        <item>Invited</item>
        <item>Failed</item>
        <item>Available</item>
        <item>Out of range</item>
   </string-array>


    <!-- Bluetooth Settings -->

    <!-- Discoverable mode timeout options -->
+17 −0
Original line number Diff line number Diff line
@@ -1272,6 +1272,23 @@
    <!-- Hint text for network prefix length -->
    <string name="wifi_network_prefix_length_hint" translatable="false">24</string>


    <!-- Wi-Fi p2p / Wi-Fi Direct settings -->
    <!-- Used in the 1st-level settings screen to launch Wi-fi Direct settings [CHAR LIMIT=25] -->
    <string name="wifi_p2p_settings_title">Wi-Fi Direct</string>
    <!-- Summary for Wi-fi Direct settings item in the 1st-level settings screen [CHAR LIMIT=50]-->
    <string name="wifi_p2p_settings_summary">Setup peer-to-peer connectivity</string>
    <string name="wifi_p2p_device_info">Device Information</string>
    <string name="wifi_p2p_wps_setup">Wi-Fi Protected Setup</string>
    <string name="wifi_p2p_wps_pin">Enter pin</string>
    <string name="wifi_p2p_persist_network">Remember this connection</string>
    <!-- Menu option to discover peers-->
    <string name="wifi_p2p_menu_search">Search</string>
    <!-- Menu option to create a group-->
    <string name="wifi_p2p_menu_create_group">Create group</string>
    <!-- Menu option to Wi-Fi p2p advanced settings -->
    <string name="wifi_p2p_menu_advanced">Advanced</string>

    <!-- Wifi AP settings-->
    <!-- Label for wifi tether checkbox. Toggles Access Point on/off -->
    <string name="wifi_tether_checkbox_text">Portable Wi-Fi hotspot</string>
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

</PreferenceScreen>
Loading