Loading res/values/cm_strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ <!-- Contributors --> <string name="e_contributors_title">/e/ contributors</string> <string name="e_supporters_title">/e/ supporters</string> <string name="lineageos_contributors_title">LineageOS contributors</string> Loading res/xml/contributors.xml +5 −1 Original line number Diff line number Diff line Loading @@ -12,5 +12,9 @@ android:key="e_contributors" android:title="@string/e_contributors_title" /> </PreferenceScreen> <!-- /e/ Supporters (web) --> <PreferenceScreen android:key="e_supporters" android:title="@string/e_supporters_title" /> </PreferenceScreen> src/com/android/settings/Contributors.java +13 −21 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; Loading @@ -23,14 +7,15 @@ 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 URL_E_CONTRIBUTORS = "https://e.foundation/about-e/#the-e-team"; private static final String KEY_E_CONTRIBUTORS = "e_contributors"; private static final String URL_E_SUPPORTERS = "https://e.foundation/support-us/#halloffame"; private static final String KEY_E_SUPPORTERS = "e_supporters"; public void onCreate(Bundle icicle) { super.onCreate(icicle); Loading @@ -44,10 +29,18 @@ public class Contributors extends SettingsPreferenceFragment { @Override public boolean onPreferenceTreeClick(Preference preference) { if (preference.getKey().equals(KEY_E_CONTRIBUTORS)) { if (preference.getKey().equals(KEY_E_CONTRIBUTORS) || preference.getKey().equals(KEY_E_SUPPORTERS) ) { final Intent intent = new Intent(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_DEFAULT); if (preference.getKey().equals(KEY_E_CONTRIBUTORS)) { intent.setData(Uri.parse(URL_E_CONTRIBUTORS)); } else if (preference.getKey().equals(KEY_E_SUPPORTERS)) { intent.setData(Uri.parse(URL_E_SUPPORTERS)); } try { startActivity(intent); } catch (Exception e) { Loading @@ -57,4 +50,3 @@ public class Contributors extends SettingsPreferenceFragment { return super.onPreferenceTreeClick(preference); } } Loading
res/values/cm_strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ <!-- Contributors --> <string name="e_contributors_title">/e/ contributors</string> <string name="e_supporters_title">/e/ supporters</string> <string name="lineageos_contributors_title">LineageOS contributors</string> Loading
res/xml/contributors.xml +5 −1 Original line number Diff line number Diff line Loading @@ -12,5 +12,9 @@ android:key="e_contributors" android:title="@string/e_contributors_title" /> </PreferenceScreen> <!-- /e/ Supporters (web) --> <PreferenceScreen android:key="e_supporters" android:title="@string/e_supporters_title" /> </PreferenceScreen>
src/com/android/settings/Contributors.java +13 −21 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; Loading @@ -23,14 +7,15 @@ 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 URL_E_CONTRIBUTORS = "https://e.foundation/about-e/#the-e-team"; private static final String KEY_E_CONTRIBUTORS = "e_contributors"; private static final String URL_E_SUPPORTERS = "https://e.foundation/support-us/#halloffame"; private static final String KEY_E_SUPPORTERS = "e_supporters"; public void onCreate(Bundle icicle) { super.onCreate(icicle); Loading @@ -44,10 +29,18 @@ public class Contributors extends SettingsPreferenceFragment { @Override public boolean onPreferenceTreeClick(Preference preference) { if (preference.getKey().equals(KEY_E_CONTRIBUTORS)) { if (preference.getKey().equals(KEY_E_CONTRIBUTORS) || preference.getKey().equals(KEY_E_SUPPORTERS) ) { final Intent intent = new Intent(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_DEFAULT); if (preference.getKey().equals(KEY_E_CONTRIBUTORS)) { intent.setData(Uri.parse(URL_E_CONTRIBUTORS)); } else if (preference.getKey().equals(KEY_E_SUPPORTERS)) { intent.setData(Uri.parse(URL_E_SUPPORTERS)); } try { startActivity(intent); } catch (Exception e) { Loading @@ -57,4 +50,3 @@ public class Contributors extends SettingsPreferenceFragment { return super.onPreferenceTreeClick(preference); } }