En frameworks/base no da ningún error, el problema está en Settings, os voy a poner aquí lo que he ido haciendo con las recomendaciones de compañeros, como AlvaroOrduna (Muchas gracias ) (antes de nada, mi github es http://github.com/DiavexRom ):
Vale, lo que añade en res/values/custom_arrays.xml lo he añadido a slim_arrays.xml, copiando y pegando, y he he hecho git rm a custom_arrys.xml
Lo que añade en custom_strings.xml lo he añadido en slim_strings.xml, y he hecho lo mismo que antes
Lo que añade en res/xml/bars_and_menus_settings.xml lo he añadido a res/xml/slim_interface_settings.xml, y he hecho git rm del primero.
Ahora es donde viene el problema.
Lo que añade en src/org/omnirom/omnigears/BarsAndMenusSettings.java y lo he intentando añadir a src/com/android/settings/slim/InterfaceSettings.java
El problema está en que el de omni tiene muchas cosas que el mío no tiene, así que ahí puse esto, que me pasó Alvaro:
(Click para mostrar/ocultar)
Código:
/*
* Copyright (C) 2013 SlimRoms
*
* 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.android.settings.slim;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.preference.Preference.OnPreferenceChangeListener;
import android.provider.MediaStore;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.Utils;
public class InterfaceSettings extends SettingsPreferenceFragment {
private static final String KEY_LISTVIEW_ANIMATION = "listview_animation";
private static final String KEY_LISTVIEW_INTERPOLATOR = "listview_interpolator";
private ListPreference mListViewAnimation;
private ListPreference mListViewInterpolator;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.slim_interface_settings);
//ListView Animations
mListViewAnimation = (ListPreference) prefSet.findPreference(KEY_LISTVIEW_ANIMATION);
String listViewAnimation = Settings.System.getString(resolver, Settings.System.LISTVIEW_ANIMATION);
if (listViewAnimation != null) {
mListViewAnimation.setValue(listViewAnimation);
}
mListViewAnimation.setOnPreferenceChangeListener(this);
mListViewInterpolator = (ListPreference) prefSet.findPreference(KEY_LISTVIEW_INTERPOLATOR);
String listViewInterpolator = Settings.System.getString(resolver, Settings.System.LISTVIEW_INTERPOLATOR);
if (listViewInterpolator != null) {
mListViewInterpolator.setValue(listViewInterpolator);
}
mListViewInterpolator.setOnPreferenceChangeListener(this);
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
return true;
}
@Override
public void onResume() {
super.onResume();
}
public boolean onPreferenceChange(Preference preference, Object objValue) {
ContentResolver resolver = getActivity().getContentResolver();
if (preference == mListViewAnimation) {
String value = (String) objValue;
Settings.System.putString(resolver, Settings.System.LISTVIEW_ANIMATION, value);
} else if (preference == mListViewInterpolator) {
String value = (String) objValue;
Settings.System.putString(resolver, Settings.System.LISTVIEW_INTERPOLATOR, value);
} else {
return false;
}
return true;
}
}
Y después, al compilar, me daba este error:
Código:
packages/apps/Settings/res/xml/slim_interface_settings.xml:38: error: Error: No resource found that matches the given name (at 'title' with value '@string/bars_and_menus_category_system_title').
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'dialogTitle' with value '@string/listview_animation_title').
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'title' with value '@string/listview_animation_title').
make: *** [/home/javierd/android/slim/out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Se espera a que terminen otras tareas....
javierd@javierd-GE70-2OC-2OD-2OE ~/android/slim $
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'dialogTitle' with value '@string/listview_animation_title').
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'title' with value '@string/listview_animation_title').
make: *** [/home/javierd/android/slim/out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Se espera a que terminen otras tareas....
¿Alguien sabe como puedo arreglarlo?
Muchísimas gracias a todos, y siento que os hayais tenido que leer el tocho entero