Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ android_library {
srcs: [
"src/**/*.java",
"src/**/*.kt",
"SomethingSettings/src/**/*.java",
],
aaptflags: ["--extra-packages org.somethingos.somethingsettings"],
exclude_srcs: [
"src/com/android/settings/biometrics/fingerprint2/lib/**/*.kt",
],
Expand All @@ -66,6 +68,7 @@ android_library {
"res",
"res-export", // for external usage
"res-product",
"SomethingSettings/res",
],
static_libs: [
// External dependencies
Expand Down Expand Up @@ -130,6 +133,9 @@ android_library {
"telephony-ext",
"extphonelib",
],
optimize: {
proguard_flags_files: ["proguard-core.flags"],
},
}

platform_compat_config {
Expand Down
30 changes: 30 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ SPDX-License-Identifier: BSD-3-Clause-Clear -->
<uses-permission android:name="android.permission.READ_USER_DICTIONARY"/>
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY"/>
<uses-permission android:name="android.permission.FORCE_STOP_PACKAGES"/>
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>
<uses-permission android:name="android.permission.BATTERY_STATS"/>
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
Expand Down Expand Up @@ -5309,6 +5310,35 @@ SPDX-License-Identifier: BSD-3-Clause-Clear -->
</intent-filter>
</receiver>

<!-- SomethingOS -->
<activity android:name="Settings$SomethingSettingsActivity"
android:label="@string/something_settings_title"
android:icon="@drawable/ic_dashboard_something"
android:exported="true"
android:taskAffinity="com.android.settings">
<intent-filter android:priority="1">
<action android:name="org.somethingos.somethingsettings.Something" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.VOICE_LAUNCH" />
<category android:name="com.android.settings.SHORTCUT" />
</intent-filter>
<intent-filter android:priority="10">
<action android:name="com.android.settings.action.SETTINGS" />
</intent-filter>
<meta-data android:name="com.android.settings.order"
android:value="-1"/>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="org.somethingos.somethingsettings.Something" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
<meta-data android:name="com.android.settings.summary"
android:resource="@string/something_settings_summary"/>
</activity>

<!-- This is the longest AndroidManifest.xml ever. -->
</application>
</manifest>
1 change: 1 addition & 0 deletions SomethingSettings
2 changes: 2 additions & 0 deletions proguard-core.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Something
-keep class org.somethingos.somethingsettings.**
16 changes: 16 additions & 0 deletions res/drawable/ic_dashboard_something.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19.58,20.02c-4.18,2.88 -9.59,1.51 -14.52,1.47 0.22,-0.2 0.43,-0.39 0.64,-0.6 1.09,-1.09 1.73,-2.4 1.76,-3.96 0,-0.1 -0.06,-0.21 -0.09,-0.31 0,0 0,0 0,0 0.24,-0.04 0.48,-0.09 0.72,-0.13 0.04,0 0.07,-0.01 0.11,-0.02 0.1,-0.01 0.19,-0.02 0.29,-0.03 1.47,-0.06 2.69,0.55 3.75,1.52 0.93,0.86 1.66,1.86 2.15,3.03 0.1,0.23 0.24,0.33 0.49,0.29 0.58,-0.1 1.18,-0.14 1.75,-0.3 0.06,-0.02 0.12,-0.04 0.18,-0.05 0.03,0 0.07,-0.02 0.1,-0.03 0.03,0 0.06,-0.02 0.09,-0.03 0.06,-0.02 0.13,-0.04 0.19,-0.06 0.67,-0.21 1.33,-0.44 2,-0.66 0.11,-0.04 0.23,-0.08 0.34,-0.12 0,0 0.01,0 0.02,0 0.01,0 0.03,0 0.04,-0.01h0Z"
android:strokeAlpha="0.7"
android:strokeWidth="0"
android:fillColor="#ffffff"
android:fillAlpha="0.7"/>
<path
android:pathData="M20,19.57c-0.99,0.33 -1.98,0.69 -2.99,0.97 -0.56,0.16 -1.16,0.2 -1.74,0.3 -0.25,0.04 -0.39,-0.06 -0.49,-0.29 -0.49,-1.17 -1.22,-2.17 -2.15,-3.03 -1.06,-0.97 -2.28,-1.58 -3.75,-1.52 -0.38,0.02 -0.75,0.11 -1.12,0.17 -0.57,0.12 -1.14,0.3 -1.72,0.36 -0.98,0.1 -1.9,-0.08 -2.54,-0.8 0.19,-0.34 0.38,-0.66 0.58,-1.01 0.06,-0.11 -0.02,-0.25 -0.15,-0.24 -0.32,0.02 -0.6,0.03 -0.91,0.05 -0.03,0 -0.05,-0.04 -0.02,-0.06 0.38,-0.25 0.72,-0.46 1.05,-0.7 1.09,-0.77 1.75,-1.76 1.75,-3.16 0,-1.38 0.52,-2.58 1.59,-3.5 0.18,-0.16 0.2,-0.3 0.15,-0.52 -0.39,-1.75 -0.99,-3.43 -1.77,-5.05 -0.01,-0.02 -0.02,-0.05 -0.03,-0.07 0,-0.02 0,-0.05 0.01,-0.06 0,0 0,0 0,0 0.02,-0.02 0.06,-0.03 0.08,0 0.63,0.45 1.29,0.88 1.89,1.37 0.93,0.75 1.76,1.6 2.39,2.62 0.2,0.33 0.85,0.33 1.06,0 0.72,-1.12 1.54,-2.16 2.52,-3.06 0.56,-0.51 1.16,-0.97 1.78,-1.48 0.86,2.1 1.22,4.18 0.9,6.36 -0.02,0.16 -0.03,0.32 -0.08,0.47h0c-0.09,0.66 -0.02,0.99 0.4,1.42 1,1.02 1.71,2.24 2.21,3.58l0.11,0.31c-0.74,-0.23 -1.46,-0.46 -2.19,-0.68 0.25,0.34 0.5,0.67 0.75,1.01 1.31,1.83 2.05,3.89 2.41,6.09 0,0.05 0,0.11 0,0.16h0ZM8.78,12.54c1.46,0.07 3.03,-0.7 3.54,-1.95 -1.57,-0.26 -3.22,0.65 -3.54,1.95h0Z"
android:strokeWidth="0"
android:fillColor="#ffffff"/>
</vector>
18 changes: 18 additions & 0 deletions res/drawable/ic_settings_mobile_plan.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<group>
<path
android:pathData="M 8 10 L 7.8 10 L 7.8 12 L 16.2 12 L 16.2 10 L 16 10 Z M 15 8 L 15.2 8 L 15.2 6 L 7.8 6 L 7.8 8 L 8 8 Z M 8 14 L 7.8 14 L 7.8 16 L 13.2 16 L 13.2 14 L 13 14 Z"
android:fillColor="#000"
android:strokeWidth="1"/>
<path
android:pathData="M 23 1 L 0.8 1 L 0.8 3 L 3 3 L 3 22 C 3 22.6 3.4 23 4 23 L 15 23 C 18.3 23 21 20.3 21 17 L 21 3 L 23.2 3 L 23.2 1 L 23 1 Z M 15 21 L 5 21 L 5 3 L 19 3 L 19 17 C 19 19.2 17.2 21 15 21 Z"
android:fillColor="#000"
android:strokeWidth="1"/>
</group>
</vector>
16 changes: 16 additions & 0 deletions res/drawable/ic_settings_private_dns.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:pathData="M 9.9 15.1 L 19.1 15.1 L 19.1 16.9 L 9.9 16.9 Z M 6.5 14.6 C 6.129 14.6 5.773 14.748 5.51 15.01 C 5.248 15.273 5.1 15.629 5.1 16 C 5.1 16.371 5.248 16.727 5.51 16.99 C 5.773 17.252 6.129 17.4 6.5 17.4 C 6.796 17.401 7.085 17.308 7.325 17.134 C 7.565 16.961 7.744 16.715 7.836 16.433 C 7.927 16.152 7.927 15.848 7.836 15.567 C 7.744 15.285 7.565 15.039 7.325 14.866 C 7.085 14.692 6.796 14.599 6.5 14.6 Z M 9.9 7.1 L 19.1 7.1 L 19.1 8.9 L 9.9 8.9 Z M 6.5 6.6 C 6.204 6.6 5.916 6.694 5.677 6.867 C 5.438 7.041 5.26 7.286 5.169 7.567 C 5.077 7.849 5.077 8.151 5.169 8.433 C 5.26 8.714 5.438 8.959 5.677 9.133 C 5.916 9.306 6.204 9.4 6.5 9.4 C 6.871 9.4 7.227 9.252 7.49 8.99 C 7.752 8.727 7.9 8.371 7.9 8 C 7.9 7.629 7.752 7.273 7.49 7.01 C 7.227 6.748 6.871 6.6 6.5 6.6 Z"
android:fillColor="#000"
android:strokeWidth="1"/>
<path
android:pathData="M 22.9 5 C 22.9 4 22.1 3.1 21 3.1 L 3 3.1 C 2 3.1 1.1 4 1.1 5 L 1.1 11 C 1.1 11.4 1.2 11.7 1.4 12 C 1.2 12.3 1.1 12.6 1.1 13 L 1.1 19 C 1.1 20 1.9 20.9 3 20.9 L 21 20.9 C 22 20.9 22.9 20.1 22.9 19 L 22.9 13 C 22.9 12.6 22.8 12.3 22.6 12 C 22.8 11.7 22.9 11.4 22.9 11 L 22.9 5 Z M 21.1 13 L 21.1 19 C 21.1 19.1 21 19.1 21 19.1 L 3 19.1 C 2.9 19.1 2.9 19 2.9 19 L 2.9 13 C 2.9 12.9 3 12.9 3 12.9 L 21 12.9 C 21.1 12.9 21.1 12.9 21.1 13 Z M 2.9 11 L 2.9 5 C 2.9 4.9 3 4.9 3 4.9 L 21 4.9 C 21.1 4.9 21.1 5 21.1 5 L 21.1 11 C 21.1 11.1 21 11.1 21 11.1 L 3 11.1 C 2.9 11.1 2.9 11.1 2.9 11 Z"
android:fillColor="#000"
android:strokeWidth="1"/>
</vector>
25 changes: 25 additions & 0 deletions res/drawable/something_chevron_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 xdroid, xyzprjkt
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"
android:viewportHeight="24">

<path
android:pathData="M0 0h24v24H0V0z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M9.31 6.71c-0.39 0.39 -0.39 1.02 0 1.41L13.19 12l-3.88 3.88c-0.39 0.39 -0.39 1.02 0 1.41 0.39 0.39 1.02 0.39 1.41 0l4.59-4.59c0.39-0.39 0.39 -1.02 0-1.41L10.72 6.7c-0.38-0.38-1.02-0.38-1.41 0.01 z" />
</vector>
37 changes: 37 additions & 0 deletions res/drawable/something_preference_background_bottom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 xdroid, xyzprjkt
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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/something_pref_ripple">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#FFFFFFFF" />
<corners
android:topRightRadius="@dimen/something_radius_merge"
android:topLeftRadius="@dimen/something_radius_merge"
android:bottomLeftRadius="@dimen/something_radius"
android:bottomRightRadius="@dimen/something_radius"
/>
</shape>
</item>
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/something_pref_color" />
<corners
android:topRightRadius="@dimen/something_radius_merge"
android:topLeftRadius="@dimen/something_radius_merge"
android:bottomLeftRadius="@dimen/something_radius"
android:bottomRightRadius="@dimen/something_radius" />
</shape>
</item>
</ripple>
28 changes: 28 additions & 0 deletions res/drawable/something_preference_background_middle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 xdroid, xyzprjkt
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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/something_pref_ripple">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#FFFFFFFF" />
<corners android:radius="@dimen/something_radius_merge" />
</shape>
</item>
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/something_pref_color" />
<corners android:radius="@dimen/something_radius_merge" />
</shape>
</item>
</ripple>
37 changes: 37 additions & 0 deletions res/drawable/something_preference_background_single.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 xdroid, xyzprjkt
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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/something_pref_ripple">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#FFFFFFFF" />
<corners
android:topRightRadius="@dimen/something_radius"
android:topLeftRadius="@dimen/something_radius"
android:bottomLeftRadius="@dimen/something_radius"
android:bottomRightRadius="@dimen/something_radius"
/>
</shape>
</item>
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/something_pref_color" />
<corners
android:topRightRadius="@dimen/something_radius"
android:topLeftRadius="@dimen/something_radius"
android:bottomLeftRadius="@dimen/something_radius"
android:bottomRightRadius="@dimen/something_radius" />
</shape>
</item>
</ripple>
38 changes: 38 additions & 0 deletions res/drawable/something_preference_background_single_accent.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 xdroid, xyzprjkt
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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/something_accent_ripple">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#FFFFFFFF" />
<corners
android:topRightRadius="30dp"
android:topLeftRadius="30dp"
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
/>
</shape>
</item>
<item android:id="@android:id/background">
<shape android:shape="rectangle" android:tint="?android:attr/colorAccent">
<solid android:color="#45C9C9C9"/>
<corners
android:topRightRadius="30dp"
android:topLeftRadius="30dp"
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
/>
</shape>
</item>
</ripple>
36 changes: 36 additions & 0 deletions res/drawable/something_preference_background_top.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 xdroid, xyzprjkt
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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/something_pref_ripple">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#FFFFFFFF" />
<corners
android:topRightRadius="@dimen/something_radius"
android:topLeftRadius="@dimen/something_radius"
android:bottomRightRadius="@dimen/something_radius_merge"
android:bottomLeftRadius="@dimen/something_radius_merge" />
</shape>
</item>
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/something_pref_color" />
<corners
android:topRightRadius="@dimen/something_radius"
android:topLeftRadius="@dimen/something_radius"
android:bottomRightRadius="@dimen/something_radius_merge"
android:bottomLeftRadius="@dimen/something_radius_merge" />
</shape>
</item>
</ripple>
Loading