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

Commit d72b90dc authored by Eug89's avatar Eug89
Browse files
parents 0fa795a5 717b179e
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
@@ -604,6 +604,62 @@

			</LinearLayout>

			<View android:layout_width="fill_parent" android:layout_height="1dp"
				android:background="?android:attr/listDivider" />

			<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
				android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight"
				android:padding="6dip">

				<LinearLayout android:orientation="vertical"
					android:layout_width="0dip" android:layout_weight="1"
					android:layout_height="fill_parent">

					<TextView android:textSize="20dip" android:layout_width="fill_parent"
						android:layout_height="0dip" android:layout_weight="1"
						android:textColor="#FFFFFF" android:gravity="center_vertical"
						android:text="@string/autoDisable3GWithWifi" />

					<TextView android:textSize="14dip" android:layout_width="fill_parent"
						android:layout_height="0dip" android:layout_weight="1"
						android:textColor="#808080" android:singleLine="true"
						android:text="@string/autoDisable3GWithWifiDescription" />

				</LinearLayout>

				<CheckBox android:id="@+id/autoDisable3GWithWifi" android:checked="false"
					android:layout_width="wrap_content" android:layout_height="wrap_content" />

			</LinearLayout>

			<View android:layout_width="fill_parent" android:layout_height="1dp"
				android:background="?android:attr/listDivider" />

			<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
				android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight"
				android:padding="6dip">

				<LinearLayout android:orientation="vertical"
					android:layout_width="0dip" android:layout_weight="1"
					android:layout_height="fill_parent">

					<TextView android:textSize="20dip" android:layout_width="fill_parent"
						android:layout_height="0dip" android:layout_weight="1"
						android:textColor="#FFFFFF" android:gravity="center_vertical"
						android:text="@string/autoEnable3GWithWifi" />

					<TextView android:textSize="14dip" android:layout_width="fill_parent"
						android:layout_height="0dip" android:layout_weight="1"
						android:textColor="#808080" android:singleLine="true"
						android:text="@string/autoEnable3GWithWifiDescription" />

				</LinearLayout>

				<CheckBox android:id="@+id/autoEnable3GWithWifi" android:checked="false"
					android:layout_width="wrap_content" android:layout_height="wrap_content" />

			</LinearLayout>

			<View android:layout_width="fill_parent" android:layout_height="1dp"
				android:background="?android:attr/listDivider" />
				
+9 −0
Original line number Diff line number Diff line
@@ -168,4 +168,13 @@
    <item msgid="1276641209451816572">"マナーモードでのみ"</item>
    <item msgid="8418930333779132418">"マナーモードのときのみ"</item>
  </string-array>

    <string-array name="incorrect_delay_entries">
        <item>なし</item>
        <item>0.5秒</item>
        <item>1秒</item>
        <item>1.5秒</item>
        <item>2秒</item>
    </string-array>

</resources>
+29 −1
Original line number Diff line number Diff line
@@ -1114,6 +1114,7 @@

    <string name="possibleButtons">"可能なボタン"</string>
    <string name="toggleWifi">"WiFiトグル"</string>
    <string name="toggleWifiAp">"ポータブルWiFiホットスポットトグル"</string>
    <string name="toggleBluetooth">"Bluetoothトグル"</string>
    <string name="toggleGPS">"GPSトグル"</string>
    <string name="toggleData">"モバイルデータトグル"</string>
@@ -1123,8 +1124,12 @@
    <string name="toggleBrightness">"明るさトグル"</string>
    <string name="toggleAutoRotate">"回転トグル"</string>
    <string name="toggleScreenTimeout">"スクリーンタイムアウト"</string>
    <string name="toggleAirplane">"機内モードトグル"</string>
    <string name="toggleFlashlight">"フラッシュライトトグル"</string>
    <string name="toggleLockScreen">"ロックスクリーントグル"</string>

    <string name="toggleWifiDescription">"WiFi有効/無効"</string>
    <string name="toggleWifiApDescription">"ポータブルWiFiホットスポット有効/無効"</string>
    <string name="toggleBluetoothDescription">"Bluetooth有効/無効"</string>
    <string name="toggleGPSDescription">"GPS有効/無効"</string>
    <string name="toggleDataDescription">"モバイルデータ通信有効/無効"</string>
@@ -1133,13 +1138,17 @@
    <string name="toggleSoundDescription">"サウンド/振動モードの切替"</string>
    <string name="toggleBrightnessDescription">"明るさレベルの切替"</string>
    <string name="toggleAutoRotateDescription">"回転センサ有効/無効"</string>
    <string name="toggleScreenTimeoutDescription">"15秒, 1分, 5分"</string>
    <string name="toggleScreenTimeoutDescription">"異なるスクリーンタイムアウトをセット"</string>
    <string name="toggleAirplaneDescription">"機内モードの切替"</string>
    <string name="toggleFlashlightDescription">"フラッシュライトモードの切替"</string>
    <string name="toggleLockScreenDescription">"ロックスクリーンの有効/無効"</string>

    <string name="generalSettings">"一般設定"</string>

    <string name="autoDisable3G">"3Gの自動無効"</string>
    <string name="autoEnable3G">"3Gの自動有効"</string>
    <string name="useRoundCorners">"角を丸くする"</string>
    <string name="useVertical">"縦配置を使用"</string>
    <string name="useTransparent">"透明なウィジェット"</string>
    <string name="autoEnableSyncWithWifi">"同期の自動有効"</string>
    <string name="autoDisableSyncWithWifi">"同期の自動無効"</string>
@@ -1150,6 +1159,8 @@
    <string name="autoEnable3GDescription">"モバイルデータ通信有効時は3G"</string>
    <string name="useRoundCornersDescription">"ウィジェットの角を丸くする"</string>
    <string name="useTransparentDescription">"ウィジェット背景を透明にする"</string>
    <string name="useVerticalDescription">"縦向きの配置で表示する"</string>

    <string name="autoEnableSyncWithWifiDescription">"WiFi接続時にデータ同期を有効にする"</string>
    <string name="autoDisableSyncWithWifiDescription">"WiFi切断時にデータ同期を無効にする"</string>
    <string name="ringModeVibrateAsOnDescription">"振動モードのときトグルON表示にする"</string>
@@ -1177,4 +1188,21 @@
    <string name="vpn_openvpn_set_extra">"追加引数"</string>
    <string name="vpn_openvpn_set_extra_message">"追加のコマンドライン引数を入力してください"</string>

    <!-- Permission settings -->
    <!-- Title of permission settings Screen -->
    <string name="permission_settings_title">"権限を表示"</string>
    <!-- Summary of permission settings Screen -->
    <string name="permission_settings_summary">"権限のリストとそれらを使用しているアプリを表示する"</string>
    <!-- Loading text displayed while loading permissions -->
    <string name="permission_settings_loading">"ロード中"</string>
    <!-- Text displayed on Refresh Menu option -->
    <string name="permission_settings_refresh">"リストを更新"</string>

    <string name="networkModeSpinner">"ネットワークモードの選択"</string>
    <string name="brightnessSpinner">"明るさレベルの選択"</string>
    <string name="ringModeSpinner">"着信音モードの選択"</string>
    <string name="screenTimeoutSpinner">"スクリーンタイムアウトの選択"</string>

    <string name="notConfigured">"未設定"</string>

</resources>
+6 −2
Original line number Diff line number Diff line
@@ -2624,8 +2624,10 @@ found in the list of installed applications.</string>
    
    <string name="generalSettings">General Settings</string>

    <string name="autoDisable3G">Automatic disables 3G</string>
    <string name="autoEnable3G">Automatic enables 3G</string>
    <string name="autoDisable3G">Data disables 3G</string>
    <string name="autoEnable3G">Data enables 3G</string>
    <string name="autoDisable3GWithWifi">Wifi disables 3G</string>
    <string name="autoEnable3GWithWifi">Wifi enables 3G</string>
    <string name="useRoundCorners">Round corners</string>
    <string name="useVertical">Vertical Layout</string>
    <string name="useTransparent">Transparent Widget</string>
@@ -2636,6 +2638,8 @@ found in the list of installed applications.</string>

    <string name="autoDisable3GDescription">2G when mobile data is disabled</string>
    <string name="autoEnable3GDescription">3G when mobile data is enabled</string>
    <string name="autoDisable3GWithWifiDescription">2G when Wifi is enabled</string>
    <string name="autoEnable3GWithWifiDescription">3G when Wifi is disbled</string>
    <string name="useRoundCornersDescription">Use round widget icons</string>
    <string name="useTransparentDescription">No widget background</string>
    <string name="useVerticalDescription">Show with vertical orientation</string>
+23 −26
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
	 * 
	 * @param context
	 */
	public static void updateWidget(Context context, Integer button) {
	public static void updateWidget(Context context) {
		logD(">> updateWidget IN");
		AppWidgetManager manager = AppWidgetManager.getInstance(context);
		int[] widgets = manager.getAppWidgetIds(THIS_APPWIDGET);
@@ -233,69 +233,66 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
		logD(">> onReceive IN");		
		super.onReceive(context, intent);
		if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(intent.getAction())) {
			logD("Received Wifi state change");
			WifiButton.getInstance().onReceive(context, intent);
			updateWidget(context,WidgetButton.BUTTON_WIFI);
		} else if (WifiManager.WIFI_AP_STATE_CHANGED_ACTION.equals(intent.getAction())) {
			logD("Received Wifi AP state change");
			WifiApButton.getInstance().onReceive(context, intent);
			updateWidget(context,WidgetButton.BUTTON_WIFI_AP);
		} else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) {
			logD("Received Bluetooth state change");
			BluetoothButton.getInstance().onReceive(context, intent);
			updateWidget(context,WidgetButton.BUTTON_BLUETOOTH);
		} else if (NetworkModeButton.NETWORK_MODE_CHANGED.equals(intent.getAction())) {
			logD("Received Network mode state change");
			NetworkModeButton.getInstance().onReceive(context, intent);
			updateWidget(context,WidgetButton.BUTTON_2G3G);
		} else if (intent.hasCategory(Intent.CATEGORY_ALTERNATIVE)) {
			Uri data = intent.getData();
			int buttonId = Integer.parseInt(data.getSchemeSpecificPart());
			if (buttonId == WidgetButton.BUTTON_WIFI) {
				logD("Received wifi button change request");
				WifiButton.getInstance().toggleState(context);
				updateWidget(context,WidgetButton.BUTTON_WIFI);
			} else if (buttonId == WidgetButton.BUTTON_WIFI_AP) {
				logD("Received wifi ap button change request");
				WifiApButton.getInstance().toggleState(context);
				updateWidget(context,WidgetButton.BUTTON_WIFI_AP);
			} else if (buttonId == WidgetButton.BUTTON_BLUETOOTH) {
				logD("Received bluetooth button change request");
				BluetoothButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_BLUETOOTH);
			} else if (buttonId == WidgetButton.BUTTON_GPS) {
				logD("Received GPS button change request");
				GPSButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_GPS);
			} else if (buttonId == WidgetButton.BUTTON_DATA) {
				logD("Received mobile data button change request");
				MobileDataButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_DATA);
			} else if (buttonId == WidgetButton.BUTTON_2G3G) {
				logD("Received network mode button change request");
				NetworkModeButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_2G3G);
			} else if (buttonId == WidgetButton.BUTTON_SYNC) {
				logD("Received sync button change request");
				SyncButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_SYNC);
			} else if (buttonId == WidgetButton.BUTTON_SOUND) {
				logD("Received sound button change request");
				SoundButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_SOUND);
			} else if (buttonId == WidgetButton.BUTTON_SCREEN_TIMEOUT) {
				logD("Received screen timeout change request");
				ScreenTimeoutButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_SCREEN_TIMEOUT);
			} else if (buttonId == WidgetButton.BUTTON_AUTO_ROTATE) {
				logD("Received auto rotate change request");
				AutoRotateButton.getInstance().toggleState(context);
				updateWidget(context,WidgetButton.BUTTON_AUTO_ROTATE);
			} else if (buttonId == WidgetButton.BUTTON_BRIGHTNESS) {
				logD("Received brightness change request");
				BrightnessButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_BRIGHTNESS);
			} else if (buttonId == WidgetButton.BUTTON_FLASHLIGHT) {
				logD("Received flahslight change request");
				FlashlightButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_FLASHLIGHT);
			} else if (buttonId == WidgetButton.BUTTON_LOCK_SCREEN) {
				logD("Received Lock Screen change request");
				LockScreenButton.getInstance().toggleState(context);
				updateWidget(context,WidgetButton.BUTTON_LOCK_SCREEN);
			} else if (buttonId == WidgetButton.BUTTON_AIRPLANE) {
				logD("Received airplane change request");
				AirplaneButton.getInstance().toggleState(context);				
				updateWidget(context,WidgetButton.BUTTON_AIRPLANE);
			}
		} else if (MobileDataButton.MOBILE_DATA_CHANGED.equals(intent.getAction())) {  
			updateWidget(context,WidgetButton.BUTTON_DATA);
		} else if (Intent.ACTION_USER_PRESENT.equals(intent.getAction())) {
			updateWidget(context,null);
		} else if (SecuritySettings.GPS_STATUS_CHANGED.equals(intent.getAction())) {
			updateWidget(context,null);
		} else if (MobileDataButton.MOBILE_DATA_CHANGED.equals(intent.getAction())||  
					Intent.ACTION_USER_PRESENT.equals(intent.getAction()) ||
					SecuritySettings.GPS_STATUS_CHANGED.equals(intent.getAction())) {
		} else {
			logD("Ignoring Action: "+intent.getAction());
			// Don't fall-through to updating the widget. The Intent
@@ -304,7 +301,7 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
			logD("<< onReceive OUT");		
			return;
		}

		updateWidget(context);
		// State changes fall through
		logD("<< onReceive OUT");		
		
Loading