-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add notice about not being able to change WiFi state while in airplan…
…e mode on Android 8.1+
- Loading branch information
Showing
9 changed files
with
187 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/de/j4velin/wifiAutoOff/NoticePreference.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.j4velin.wifiAutoOff; | ||
|
||
import android.content.Context; | ||
import android.graphics.Color; | ||
import android.preference.Preference; | ||
import android.util.AttributeSet; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
public class NoticePreference extends Preference { | ||
|
||
public NoticePreference(final Context context, final AttributeSet attrs) { | ||
super(context, attrs); | ||
} | ||
|
||
@Override | ||
protected View onCreateView(final ViewGroup parent) { | ||
View v = super.onCreateView(parent); | ||
v.setBackgroundColor(Color.parseColor("#66ccff")); | ||
return v; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<path | ||
android:fillColor="#FF000000" | ||
android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<de.j4velin.wifiAutoOff.NoticePreference | ||
android:selectable="false" | ||
android:summary="@string/airplane_notice" | ||
android:title="@string/airplane_title"/> | ||
|
||
<de.j4velin.wifiAutoOff.StatusPreference | ||
android:key="status"/> | ||
|
||
<PreferenceCategory android:title="@string/turn_wifi_on_"> | ||
<CheckBoxPreference | ||
android:defaultValue="true" | ||
android:key="on_unlock" | ||
android:title="@string/when_device_gets_unlocked"/> | ||
<CheckBoxPreference | ||
android:defaultValue="false" | ||
android:key="on_at"/> | ||
<CheckBoxPreference | ||
android:defaultValue="false" | ||
android:key="on_every"/> | ||
<CheckBoxPreference | ||
android:defaultValue="false" | ||
android:key="power_connected" | ||
android:summary="@string/power_summary" | ||
android:title="@string/power_title"/> | ||
<Preference | ||
android:key="locations" | ||
android:summary="@string/location_summary" | ||
android:title="@string/when_entering_location"/> | ||
</PreferenceCategory> | ||
<PreferenceCategory android:title="@string/turn_wifi_off_when_"> | ||
<CheckBoxPreference | ||
android:defaultValue="true" | ||
android:key="off_screen_off" | ||
android:title="@string/screen_is_off"/> | ||
<CheckBoxPreference | ||
android:defaultValue="true" | ||
android:key="off_no_network" | ||
android:title="@string/not_connected_to_any_network"/> | ||
<CheckBoxPreference | ||
android:defaultValue="false" | ||
android:key="off_at"/> | ||
</PreferenceCategory> | ||
<PreferenceCategory android:title="@string/general_settings"> | ||
<Preference | ||
android:key="log" | ||
android:summary="@string/log_summary" | ||
android:title="@string/log_title"/> | ||
</PreferenceCategory> | ||
|
||
</PreferenceScreen> |