Loading res/values/cm_strings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,14 @@ <!-- LineageOS legal --> <string name="lineagelicense_title">LineageOS legal</string> <!-- /e/ legal --> <string name="elicense_title">/e/ legal</string> <!-- Contributors --> <string name="e_contributors_title">/e/ contributors</string> <string name="lineageos_contributors_title">LineageOS contributors</string> <!-- Volume settings - Volume adjustment sound --> <string name="volume_adjust_sounds_title">Volume adjustment sounds</string> Loading res/xml/about_legal.xml +5 −1 Original line number Diff line number Diff line Loading @@ -37,12 +37,16 @@ <intent android:action="android.settings.LICENSE"/> </Preference> <!-- eFoundation License information --> <PreferenceScreen android:key="elicense" android:title="@string/elicense_title" /> <!-- Lineage License information --> <PreferenceScreen android:key="lineagelicense" android:title="@string/lineagelicense_title" /> <!-- Terms and conditions --> <Preference android:key="terms" Loading res/xml/contributors.xml 0 → 100644 +16 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/contributors_title"> <!-- Contributors cloud --> <org.lineageos.internal.lineageparts.LineagePartsPreference android:key="contributors" /> <!-- /e/ Contributors (web) --> <PreferenceScreen android:key="e_contributors" android:title="@string/e_contributors_title" /> </PreferenceScreen> res/xml/device_info_settings.xml +6 −3 Original line number Diff line number Diff line Loading @@ -71,9 +71,12 @@ <Preference android:key="device_feedback" android:title="@string/device_feedback" /> <!-- Contributors cloud --> <org.lineageos.internal.lineageparts.LineagePartsPreference android:key="contributors" /> <PreferenceScreen android:key="contributors_page" android:title="@string/contributors_title" android:fragment="com.android.settings.Contributors" > </PreferenceScreen> <!-- Device hardware model --> <Preference Loading src/com/android/settings/Contributors.java 0 → 100644 +60 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * 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; import android.content.Intent; import android.app.Activity; import android.net.Uri; import android.util.Log; import android.os.Bundle; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceGroup; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; public class Contributors extends SettingsPreferenceFragment { private static final String LOG_TAG = "Contributors"; private static final String URL_E_CONTRIBUTORS = "https://e.foundation/support-us/#halloffame"; private static final String KEY_E_CONTRIBUTORS = "e_contributors"; public void onCreate(Bundle icicle) { super.onCreate(icicle); addPreferencesFromResource(R.xml.contributors); } @Override public int getMetricsCategory() { return MetricsEvent.CONTRIBUTORS; } @Override public boolean onPreferenceTreeClick(Preference preference) { if (preference.getKey().equals(KEY_E_CONTRIBUTORS)) { final Intent intent = new Intent(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setData(Uri.parse(URL_E_CONTRIBUTORS)); try { startActivity(intent); } catch (Exception e) { Log.e(LOG_TAG, "Unable to start activity " + intent.toString()); } } return super.onPreferenceTreeClick(preference); } } Loading
res/values/cm_strings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,14 @@ <!-- LineageOS legal --> <string name="lineagelicense_title">LineageOS legal</string> <!-- /e/ legal --> <string name="elicense_title">/e/ legal</string> <!-- Contributors --> <string name="e_contributors_title">/e/ contributors</string> <string name="lineageos_contributors_title">LineageOS contributors</string> <!-- Volume settings - Volume adjustment sound --> <string name="volume_adjust_sounds_title">Volume adjustment sounds</string> Loading
res/xml/about_legal.xml +5 −1 Original line number Diff line number Diff line Loading @@ -37,12 +37,16 @@ <intent android:action="android.settings.LICENSE"/> </Preference> <!-- eFoundation License information --> <PreferenceScreen android:key="elicense" android:title="@string/elicense_title" /> <!-- Lineage License information --> <PreferenceScreen android:key="lineagelicense" android:title="@string/lineagelicense_title" /> <!-- Terms and conditions --> <Preference android:key="terms" Loading
res/xml/contributors.xml 0 → 100644 +16 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/contributors_title"> <!-- Contributors cloud --> <org.lineageos.internal.lineageparts.LineagePartsPreference android:key="contributors" /> <!-- /e/ Contributors (web) --> <PreferenceScreen android:key="e_contributors" android:title="@string/e_contributors_title" /> </PreferenceScreen>
res/xml/device_info_settings.xml +6 −3 Original line number Diff line number Diff line Loading @@ -71,9 +71,12 @@ <Preference android:key="device_feedback" android:title="@string/device_feedback" /> <!-- Contributors cloud --> <org.lineageos.internal.lineageparts.LineagePartsPreference android:key="contributors" /> <PreferenceScreen android:key="contributors_page" android:title="@string/contributors_title" android:fragment="com.android.settings.Contributors" > </PreferenceScreen> <!-- Device hardware model --> <Preference Loading
src/com/android/settings/Contributors.java 0 → 100644 +60 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * 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; import android.content.Intent; import android.app.Activity; import android.net.Uri; import android.util.Log; import android.os.Bundle; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceGroup; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; public class Contributors extends SettingsPreferenceFragment { private static final String LOG_TAG = "Contributors"; private static final String URL_E_CONTRIBUTORS = "https://e.foundation/support-us/#halloffame"; private static final String KEY_E_CONTRIBUTORS = "e_contributors"; public void onCreate(Bundle icicle) { super.onCreate(icicle); addPreferencesFromResource(R.xml.contributors); } @Override public int getMetricsCategory() { return MetricsEvent.CONTRIBUTORS; } @Override public boolean onPreferenceTreeClick(Preference preference) { if (preference.getKey().equals(KEY_E_CONTRIBUTORS)) { final Intent intent = new Intent(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setData(Uri.parse(URL_E_CONTRIBUTORS)); try { startActivity(intent); } catch (Exception e) { Log.e(LOG_TAG, "Unable to start activity " + intent.toString()); } } return super.onPreferenceTreeClick(preference); } }