Loading AndroidManifest.xml +21 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,27 @@ android:resource="@string/summary_empty" /> </activity-alias> <!-- OpenKeychain settings (Security category) --> <activity-alias android:name=".openkeychain.OpenKeychainSettings" android:label="@string/openkeychain_title" android:targetActivity="PartsActivity"> <intent-filter> <action android:name="com.android.settings.action.IA_SETTINGS" /> <action android:name="org.lineageos.lineageparts.OPENKEYCHAIN_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.ia.security" /> <meta-data android:name="com.android.settings.order" android:value="75" /> <meta-data android:name="com.android.settings.summary" android:resource="@string/summary_empty" /> </activity-alias> <!-- Trust interface (Privacy category) --> <activity-alias android:name=".trust.TrustPreferences" Loading res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -704,4 +704,7 @@ <!-- MicroG --> <string name="microg_title">MicroG</string> <!-- OpenKeyChain --> <string name="openkeychain_title">OpenKeychain</string> </resources> res/xml/openkeychain_settings.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2022 /e/ foundation 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. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:key="openkeychain_settings" android:title="@string/openkeychain_title" /> res/xml/parts_catalog.xml +5 −0 Original line number Diff line number Diff line Loading @@ -111,4 +111,9 @@ android:title="@string/microg_title" android:fragment="org.lineageos.lineageparts.microg.MicrogSettings" lineage:xmlRes="@xml/microg_settings" /> <part android:key="openkeychain_Settings" android:title="@string/openkeychain_title" android:fragment="org.lineageos.lineageparts.openkeychain.OpenKeychainSettings" lineage:xmlRes="@xml/openkeychain_settings" /> </parts-catalog> src/org/lineageos/lineageparts/openkeychain/OpenKeychainSettings.java 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 /e/ foundation * * 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 org.lineageos.lineageparts.openkeychain; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; import org.lineageos.lineageparts.R; import org.lineageos.lineageparts.SettingsPreferenceFragment; public class OpenKeychainSettings extends SettingsPreferenceFragment { private static final String OPENKEYCHAIN_PACKAGE_NAME = "org.sufficientlysecure.keychain"; private static final String OPENKEYCHAIN_ACTIVITY_NAME = "org.sufficientlysecure.keychain.ui.MainActivity"; @Override public void onCreate(Bundle savedInstance) { super.onCreate(savedInstance); Intent intent = new Intent(Intent.ACTION_MAIN); intent.setComponent(new ComponentName(OPENKEYCHAIN_PACKAGE_NAME, OPENKEYCHAIN_ACTIVITY_NAME)); startActivity(intent); Activity activity = getActivity(); if (activity != null) { activity.finish(); } } } Loading
AndroidManifest.xml +21 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,27 @@ android:resource="@string/summary_empty" /> </activity-alias> <!-- OpenKeychain settings (Security category) --> <activity-alias android:name=".openkeychain.OpenKeychainSettings" android:label="@string/openkeychain_title" android:targetActivity="PartsActivity"> <intent-filter> <action android:name="com.android.settings.action.IA_SETTINGS" /> <action android:name="org.lineageos.lineageparts.OPENKEYCHAIN_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.ia.security" /> <meta-data android:name="com.android.settings.order" android:value="75" /> <meta-data android:name="com.android.settings.summary" android:resource="@string/summary_empty" /> </activity-alias> <!-- Trust interface (Privacy category) --> <activity-alias android:name=".trust.TrustPreferences" Loading
res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -704,4 +704,7 @@ <!-- MicroG --> <string name="microg_title">MicroG</string> <!-- OpenKeyChain --> <string name="openkeychain_title">OpenKeychain</string> </resources>
res/xml/openkeychain_settings.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2022 /e/ foundation 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. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:key="openkeychain_settings" android:title="@string/openkeychain_title" />
res/xml/parts_catalog.xml +5 −0 Original line number Diff line number Diff line Loading @@ -111,4 +111,9 @@ android:title="@string/microg_title" android:fragment="org.lineageos.lineageparts.microg.MicrogSettings" lineage:xmlRes="@xml/microg_settings" /> <part android:key="openkeychain_Settings" android:title="@string/openkeychain_title" android:fragment="org.lineageos.lineageparts.openkeychain.OpenKeychainSettings" lineage:xmlRes="@xml/openkeychain_settings" /> </parts-catalog>
src/org/lineageos/lineageparts/openkeychain/OpenKeychainSettings.java 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 /e/ foundation * * 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 org.lineageos.lineageparts.openkeychain; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; import org.lineageos.lineageparts.R; import org.lineageos.lineageparts.SettingsPreferenceFragment; public class OpenKeychainSettings extends SettingsPreferenceFragment { private static final String OPENKEYCHAIN_PACKAGE_NAME = "org.sufficientlysecure.keychain"; private static final String OPENKEYCHAIN_ACTIVITY_NAME = "org.sufficientlysecure.keychain.ui.MainActivity"; @Override public void onCreate(Bundle savedInstance) { super.onCreate(savedInstance); Intent intent = new Intent(Intent.ACTION_MAIN); intent.setComponent(new ComponentName(OPENKEYCHAIN_PACKAGE_NAME, OPENKEYCHAIN_ACTIVITY_NAME)); startActivity(intent); Activity activity = getActivity(); if (activity != null) { activity.finish(); } } }