Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f68ba7d3 authored by Romain Hunault's avatar Romain Hunault
Browse files

Create menu for microG (instead of submenu)

parent 3819a480
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3226,8 +3226,6 @@
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                android:value="com.android.settings.category.system" />
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.MicroGSettings" />
        </activity>

    </application>

res/xml/micro_g_prefs.xml

deleted100644 → 0
+0 −27
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
        android:title="@string/micro_g">

    <Preference android:title="@string/micro_g_title" >
        <intent android:action="android.intent.action.MAIN"
            android:targetPackage="com.google.android.gms"
            android:targetClass="org.microg.gms.ui.SettingsActivity" />
    </Preference>

</PreferenceScreen>
+0 −34
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 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.os.Bundle;

public class MicroGSettings extends SettingsPreferenceFragment {

    @Override
    protected int getMetricsCategory() {
        return com.android.settings.InstrumentedFragment.UNDECLARED;
    }

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        addPreferencesFromResource(R.xml.micro_g_prefs);
    }
}
+13 −1
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@ package com.android.settings;
import com.android.settings.applications.AppOpsSummary;
import com.android.settings.fingerprint.FingerprintEnrollIntroduction;
import com.android.settings.fingerprint.FingerprintSettings;
import android.content.Intent;
import android.content.ComponentName;
import android.os.Bundle;

/**
 * Top-level Settings activity
@@ -156,7 +159,16 @@ public class Settings extends SettingsActivity {
    public static class TestingSettingsActivity extends SettingsActivity { /* empty */ }
    public static class WifiAPITestActivity extends SettingsActivity { /* empty */ }
    public static class WifiInfoActivity extends SettingsActivity { /* empty */ }
    public static class MicroGActivity extends SettingsActivity { /* empty */ }
    public static class MicroGActivity extends SettingsActivity {
        @Override
        protected void onCreate(Bundle savedState) {
            super.onCreate(savedState);

            Intent intent = new Intent("android.intent.action.MAIN");
            intent.setComponent(new ComponentName("com.google.android.gms", "org.microg.gms.ui.SettingsActivity"));
            startActivity(intent);
        }
    }

    // Categories.
    public static class WirelessSettings extends SettingsActivity { /* empty */ }
+1 −2
Original line number Diff line number Diff line
@@ -369,8 +369,7 @@ public class SettingsActivity extends SettingsDrawerActivity
            MasterClear.class.getName(),
            NightDisplaySettings.class.getName(),
            ManageDomainUrls.class.getName(),
            AutomaticStorageManagerSettings.class.getName(),
            MicroGSettings.class.getName()
            AutomaticStorageManagerSettings.class.getName()
    };