Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microG Settings integration, icon/activity changes #1191

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
30 changes: 26 additions & 4 deletions play-services-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
</intent-filter>
</activity>

<!-- microG Settings shown in Launcher -->
<!-- microG Settings activity -->
<activity
android:name="org.microg.gms.ui.SettingsActivity"
android:exported="true"
Expand All @@ -465,18 +465,40 @@
<!-- microG Settings embedded in System Settings on SDK 23 and newer -->
<activity-alias
android:enabled="true"
android:exported="true"
android:name="org.microg.gms.ui.SettingsActivityLink"
android:icon="@drawable/microg_light_color_24"
android:label="@string/gms_settings_name"
android:process=":ui"
android:targetActivity="org.microg.gms.ui.SettingsActivity">
<intent-filter>
<action android:name="com.android.settings.action.EXTRA_SETTINGS" />
<action android:name="com.android.settings.action.EXTRA_SETTINGS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.personal"/>
<meta-data
android:name="com.android.settings.icon"
android:resource="@drawable/microg_light_color_24"/>
</activity-alias>

<!-- microG Settings embedded in System Settings on SDK 26 and newer -->
<activity-alias
android:enabled="true"
android:exported="true"
android:name="org.microg.gms.ui.SettingsActivityIALink"
android:targetActivity="org.microg.gms.ui.SettingsActivity"
android:icon="@drawable/microg_light_color_24"
android:label="@string/gms_settings_name"
android:theme="@style/Theme.AppCompat.Settings.Dashboard">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.device" />
android:value="com.android.settings.category.ia.homepage"/>
<meta-data
android:name="com.android.settings.icon"
android:resource="@drawable/microg_light_color_24" />
Expand All @@ -485,7 +507,7 @@
android:resource="@string/gms_settings_summary" />
</activity-alias>

<!-- Separate launcher icon from main activity so it can be disabled manualy -->
<!-- microG Settings activity-alias shown in Launcher -->
<activity-alias
android:enabled="true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be interesting to try something like this:
android:enabled="@bool/is_alias_enabled"
then add <bool name="is_alias_enabled">true</bool> to bools.xml
and create ../values-v23/bools.xml with this

<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 microG Project Team
  ~
  ~ 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.
  -->

<resources>
    <bool name="is_alias_enabled">false</bool>
</resources>

So launcher icon should be always disabled Android 6.0 and newer.
Settings integration is available starting from this android version.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So launcher icon should be always disabled Android 6.0 and newer. Settings integration is available starting from this android version.

Honeslty I think that can be still visible, is a shortcut, wothout go on settings>system>microg.
For the same reason I have installed an app to open update on lineageos.

android:name="org.microg.gms.ui.SettingsActivityLauncher"
Expand Down