Skip to content
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
4 changes: 3 additions & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1027,5 +1027,7 @@
<string name="slim_blacklist_apps_summary">Apps to not show in the panel</string>
<string name="slim_blacklist_add_apps_title">Add app</string>
<string name="slim_blacklist_add_apps_summary">Tap here to add, tap on added app to remove it</string>

<!-- XiaomiParts -->
<string name="device_part_title">XiaomiParts</string>
<string name="device_part_opt">Tweaks</string>
</resources>
14 changes: 14 additions & 0 deletions res/xml/general_tweaks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,18 @@

</PreferenceCategory>

<PreferenceCategory
android:key="device_part_opt"
android:title="@string/device_part_opt">

<Preference
android:key="device_part"
android:persistent="false"
android:title="@string/device_part_title">
<intent android:action="android.intent.action.MAIN"
android:targetPackage="com.elixir.settings.device"
android:targetClass="com.elixir.settings.device.DeviceSettings"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol rip

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wierd part it works

</Preference>
</PreferenceCategory>

</PreferenceScreen>
9 changes: 9 additions & 0 deletions src/org/aospextended/extensions/Buttons.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import android.support.v14.preference.SwitchPreference;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.development.DevelopmentSettings;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.Utils;

Expand Down Expand Up @@ -92,6 +93,14 @@ public class Buttons extends ActionFragment implements OnPreferenceChangeListene
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

final String KEY_DEVICE_PART = "device_part";
final String KEY_DEVICE_PART_PACKAGE_NAME = "com.elixir.settings.device";

// XiaomiParts
if (!DevelopmentSettings.isPackageInstalled(getActivity(), KEY_DEVICE_PART_PACKAGE_NAME)) {
getPreferenceScreen().removePreference(findPreference(KEY_DEVICE_PART));
}

addPreferencesFromResource(R.xml.buttons);

final ContentResolver resolver = getActivity().getContentResolver();
Expand Down