diff --git a/res/drawable/ic_logo.xml b/res/drawable/ic_logo.xml
new file mode 100644
index 0000000..0c51764
--- /dev/null
+++ b/res/drawable/ic_logo.xml
@@ -0,0 +1,417 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/values/cherish_arrays.xml b/res/values/cherish_arrays.xml
index a75f2e6..2160f18 100644
--- a/res/values/cherish_arrays.xml
+++ b/res/values/cherish_arrays.xml
@@ -1198,4 +1198,120 @@
- 4
- 5
+
+
+
+ - @string/status_bar_logo_position_left
+ - @string/status_bar_logo_position_right
+
+
+ - 0
+ - 1
+
+
+
+
+ - @string/status_bar_logo_style_cherish
+ - @string/status_bar_logo_style_android
+ - @string/status_bar_logo_style_apple
+ - @string/status_bar_logo_style_beats
+ - @string/status_bar_logo_style_biohazard
+ - @string/status_bar_logo_style_blackberry
+ - @string/status_bar_logo_style_blogger
+ - @string/status_bar_logo_style_bomb
+ - @string/status_bar_logo_style_brain
+ - @string/status_bar_logo_style_cake
+ - @string/status_bar_logo_style_cannabis
+ - @string/status_bar_logo_style_death_star
+ - @string/status_bar_logo_style_emoticon
+ - @string/status_bar_logo_style_emoticon_cool
+ - @string/status_bar_logo_style_emoticon_dead
+ - @string/status_bar_logo_style_emoticon_devil
+ - @string/status_bar_logo_style_emoticon_happy
+ - @string/status_bar_logo_style_emoticon_neutral
+ - @string/status_bar_logo_style_emoticon_poop
+ - @string/status_bar_logo_style_emoticon_sad
+ - @string/status_bar_logo_style_emoticon_tongue
+ - @string/status_bar_logo_style_fire
+ - @string/status_bar_logo_style_flask
+ - @string/status_bar_logo_style_gender_female
+ - @string/status_bar_logo_style_gender_male
+ - @string/status_bar_logo_style_gender_male_female
+ - @string/status_bar_logo_style_ghost
+ - @string/status_bar_logo_style_google
+ - @string/status_bar_logo_style_guitar_acoustic
+ - @string/status_bar_logo_style_guitar_electric
+ - @string/status_bar_logo_style_heart
+ - @string/status_bar_logo_style_human_female
+ - @string/status_bar_logo_style_human_male
+ - @string/status_bar_logo_style_human_male_female
+ - @string/status_bar_logo_style_incognito
+ - @string/status_bar_logo_style_ios
+ - @string/status_bar_logo_style_linux
+ - @string/status_bar_logo_style_lock
+ - @string/status_bar_logo_style_music_note
+ - @string/status_bar_logo_style_ninja
+ - @string/status_bar_logo_style_pac_man
+ - @string/status_bar_logo_style_peace
+ - @string/status_bar_logo_style_robot
+ - @string/status_bar_logo_style_skull
+ - @string/status_bar_logo_style_smoking
+ - @string/status_bar_logo_style_wallet
+ - @string/status_bar_logo_style_windows
+ - @string/status_bar_logo_style_xbox
+ - @string/status_bar_logo_style_xbox_controller
+ - @string/status_bar_logo_style_yin_yang
+
+
+ - 0
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ - 6
+ - 7
+ - 8
+ - 9
+ - 10
+ - 11
+ - 12
+ - 13
+ - 14
+ - 15
+ - 16
+ - 17
+ - 18
+ - 19
+ - 20
+ - 21
+ - 22
+ - 23
+ - 24
+ - 25
+ - 26
+ - 27
+ - 28
+ - 29
+ - 30
+ - 31
+ - 32
+ - 33
+ - 34
+ - 35
+ - 36
+ - 37
+ - 38
+ - 39
+ - 40
+ - 41
+ - 42
+ - 43
+ - 44
+ - 45
+ - 46
+ - 47
+ - 48
+ - 49
+
diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml
index 94b69ce..e278f0d 100644
--- a/res/values/cherish_strings.xml
+++ b/res/values/cherish_strings.xml
@@ -1067,4 +1067,64 @@
QS Media player
Show media player in QS.\nRequires a SystemUI restart
Show media player as a notification.\nRequires a SystemUI restart
+
+
+ Logo
+ Show a custom logo in the status bar
+ Logo color
+ Logo position
+ %1$s
+ Right
+ Left
+ Logo style
+ Cherish
+ Android
+ Apple
+ Beats
+ Biohazard
+ Blackberry
+ Blogger
+ Bomb
+ Brain
+ Cake
+ Cannabis
+ Death Star
+ Emoji
+ Emoji (Cool)
+ Emoji (Dead)
+ Emoji (Devil)
+ Emoji (Happy)
+ Emoji (Neutral)
+ Emoji (Poop)
+ Emoji (Sad)
+ Emoji (Tongue)
+ Fire
+ Flask
+ Gender (Male)
+ Gender (Female)
+ Gender (Male & Female)
+ Ghost
+ Google
+ Guitar (Acoustic)
+ Guitar (Electric)
+ Heart
+ Human (Male)
+ Human (Female)
+ Human (Male & Female)
+ Incognito
+ iOS
+ Linux
+ Lock
+ Music Note
+ Ninja
+ Pac-Man
+ Peace
+ Robot
+ Skull
+ Smoking
+ Wallet
+ Windows
+ XBOX
+ XBOX Controller
+ Yin-Yang
diff --git a/res/xml/cherish_settings_statusbar.xml b/res/xml/cherish_settings_statusbar.xml
index 6450592..c0a7cee 100644
--- a/res/xml/cherish_settings_statusbar.xml
+++ b/res/xml/cherish_settings_statusbar.xml
@@ -124,5 +124,13 @@
android:title="@string/carrier_label_settings_title"
android:summary="@string/carrier_label_settings_summary"
android:fragment="com.cherish.settings.fragments.CustomCarrierLabel" />
+
+
diff --git a/res/xml/statusbar_logo.xml b/res/xml/statusbar_logo.xml
new file mode 100644
index 0000000..62df4ea
--- /dev/null
+++ b/res/xml/statusbar_logo.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/com/cherish/settings/fragments/StatusBarSettings.java b/src/com/cherish/settings/fragments/StatusBarSettings.java
index 21d3f73..62165ec 100644
--- a/src/com/cherish/settings/fragments/StatusBarSettings.java
+++ b/src/com/cherish/settings/fragments/StatusBarSettings.java
@@ -39,6 +39,10 @@ import java.util.Collections;
public class StatusBarSettings extends SettingsPreferenceFragment implements
OnPreferenceChangeListener {
+
+ private static final String STATUS_BAR_LOGO = "status_bar_logo";
+
+ private SystemSettingMasterSwitchPreference mStatusBarLogo;
@Override
public void onCreate(Bundle icicle) {
@@ -49,11 +53,22 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
ContentResolver resolver = getActivity().getContentResolver();
PreferenceScreen prefSet = getPreferenceScreen();
+
+ mStatusBarLogo = (SystemSettingMasterSwitchPreference) findPreference(STATUS_BAR_LOGO);
+ mStatusBarLogo.setChecked((Settings.System.getInt(getActivity().getContentResolver(),
+ Settings.System.STATUS_BAR_LOGO, 0) == 1));
+ mStatusBarLogo.setOnPreferenceChangeListener(this);
+
}
@Override
public boolean onPreferenceChange(Preference preference, Object objValue) {
-
+ if (preference == mStatusBarLogo) {
+ boolean value = (Boolean) objValue;
+ Settings.System.putInt(getActivity().getContentResolver(),
+ Settings.System.STATUS_BAR_LOGO, value ? 1 : 0);
+ return true;
+ }
return false;
}
@@ -62,5 +77,4 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
}
-}
-
+}
\ No newline at end of file
diff --git a/src/com/cherish/settings/fragments/StatusbarLogo.java b/src/com/cherish/settings/fragments/StatusbarLogo.java
new file mode 100644
index 0000000..b371bad
--- /dev/null
+++ b/src/com/cherish/settings/fragments/StatusbarLogo.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2020 TenX-OS
+ *
+ * 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.
+ */
+
+package com.cherish.settings.fragments;
+
+import android.content.Context;
+import android.content.ContentResolver;
+import android.os.Bundle;
+import android.provider.Settings;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.Preference.OnPreferenceChangeListener;
+
+import com.android.internal.logging.nano.MetricsProto;
+
+import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
+
+public class StatusbarLogo extends SettingsPreferenceFragment implements
+ OnPreferenceChangeListener {
+
+ @Override
+ public void onCreate(Bundle savedInstance) {
+ super.onCreate(savedInstance);
+ addPreferencesFromResource(R.xml.statusbar_logo);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ return false;
+ }
+
+ @Override
+ public int getMetricsCategory() {
+ return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
+ }
+}
\ No newline at end of file