mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-11-10 13:05:05 +00:00
parent
4e73953360
commit
9e0ba087f3
10 changed files with 59 additions and 21 deletions
|
@ -15,6 +15,8 @@ import android.util.Log;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
|
import org.microg.gms.base.core.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ForegroundServiceContext extends ContextWrapper {
|
public class ForegroundServiceContext extends ContextWrapper {
|
||||||
|
@ -66,14 +68,16 @@ public class ForegroundServiceContext extends ContextWrapper {
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
private static Notification buildForegroundNotification(Context context) {
|
private static Notification buildForegroundNotification(Context context) {
|
||||||
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_NONE);
|
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_NONE);
|
||||||
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
|
||||||
channel.setShowBadge(false);
|
channel.setShowBadge(false);
|
||||||
|
channel.setLockscreenVisibility(0);
|
||||||
channel.setVibrationPattern(new long[0]);
|
channel.setVibrationPattern(new long[0]);
|
||||||
context.getSystemService(NotificationManager.class).createNotificationChannel(channel);
|
context.getSystemService(NotificationManager.class).createNotificationChannel(channel);
|
||||||
return new Notification.Builder(context, channel.getId())
|
return new Notification.Builder(context, channel.getId())
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setContentTitle("Running in background")
|
.setContentTitle("Running in background")
|
||||||
//.setSmallIcon(R.drawable.gcm_bell)
|
.setContentText("This notification ensures, that microG does not get killed.")
|
||||||
|
.setSmallIcon(R.drawable.ic_foreground_notification)
|
||||||
|
.setColor(0xFFFFFF)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<vector android:height="30.287416dp" android:viewportHeight="1169.74"
|
||||||
|
android:viewportWidth="965.533" android:width="25dp"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFF"
|
||||||
|
android:pathData="m937.33,922.52c0.01,0.16 0.01,0.32 0,0.46 -0.04,31.65 2.1,100.42 -1.89,133.26 0.01,0.01 0,0.03 0,0.03 -8.86,49.71 -51.31,84.66 -107.91,85.19 -111.09,1.05 -222.21,0.29 -333.32,0.29 0,0 -109.2,0.49 -163.79,0.49 0,0 -0.01,-0.01 -0.03,0 -48.3,0 -96.62,-0.04 -144.92,-0.17 -9.79,-0.03 -19.62,-0.32 -29.4,-0.9 -8.38,-0.47 -16.75,-1.19 -25.08,-2.15 -52.64,-6.06 -89.27,-38.11 -99.79,-85.57 0,-0.01 -0.01,-0.04 -0.01,-0.07 -1.91,-8.55 -2.95,-17.61 -3.1,-27.1 -0.69,-46.45 -0.54,-92.94 -0.26,-139.41v-0.19c0.03,-5.39 0.06,-10.76 0.1,-16.15 0.23,-33.27 4.4,-36.94 38.49,-37.67 17.29,-0.37 34.66,0.27 51.89,-1.06 103.35,-8.07 167.98,-114.53 122.18,-207.76 -22.77,-46.34 -62.96,-77.72 -119.02,-79.53 -22.75,-0.73 -45.52,-0.92 -68.29,-1.05 -16.91,-0.11 -25.09,-8.34 -25.03,-25.19 0.07,-18.83 -0.11,-37.69 -0.3,-56.53v-0.4c-0.33,-31.19 -0.64,-62.37 0.14,-93.5v-0.09c0.29,-11.75 1.6,-37.93 1.73,-39.28 0,0 0,-0.01 0,-0.03 5.53,-58.56 56.56,-92.89 115.32,-88.67 60.99,1.61 121.9,2.21 182.87,2.61 22.15,0.14 29.35,-13.14 30.51,-33.49 1.79,-31.7 2.45,-63.85 8.65,-94.8 8.88,-44.29 45.26,-86.63 104.39,-86.59 62.16,0.19 113.83,33 125.91,84.63 7.16,30.66 8.96,62.86 10.3,94.5 0.92,21.84 8.4,33.33 27.12,35.81h0.01c2.79,0.39 5.82,0.56 9.13,0.53 55.07,-0.4 110.13,-0.57 165.18,0.54 8.38,0.47 16.75,1.19 25.08,2.15 52.64,6.06 89.27,38.11 99.79,85.57 1.13,7.05 2.02,14.69 2.68,22.93 0.32,46.27 0.54,93.74 0.69,141.91v0.43c0.41,140.33 0.21,286.54 -0.02,426.02z" android:strokeWidth="55">
|
||||||
|
<aapt:attr name="android:strokeColor">
|
||||||
|
<gradient android:endX="1436.4504" android:endY="668.0306"
|
||||||
|
android:startX="560.4707" android:startY="1544.0103" android:type="linear">
|
||||||
|
<item android:color="#FF3370FA" android:offset="1.065558E-7"/>
|
||||||
|
<item android:color="#FFF80439" android:offset="1"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
</vector>
|
24
play-services-base-core/src/main/res/drawable/ic_microg.xml
Normal file
24
play-services-base-core/src/main/res/drawable/ic_microg.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<vector android:height="25dp" android:viewportHeight="2000"
|
||||||
|
android:viewportWidth="2000" android:width="25dp"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#0C0C0F"
|
||||||
|
android:pathData="M1000,1000m-852.75,0a852.75,852.75 0,1 1,1705.5 0a852.75,852.75 0,1 1,-1705.5 0" android:strokeWidth="70">
|
||||||
|
<aapt:attr name="android:strokeColor">
|
||||||
|
<gradient android:endX="1627.734" android:endY="372.266"
|
||||||
|
android:startX="372.266" android:startY="1627.734" android:type="linear">
|
||||||
|
<item android:color="#FF3370FA" android:offset="1.118836E-7"/>
|
||||||
|
<item android:color="#FFF80439" android:offset="1"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path android:fillColor="#00000000"
|
||||||
|
android:pathData="M1454.65,1337.65c0.01,0.16 0.01,0.32 0,0.46c-0.04,31.65 2.1,100.42 -1.89,133.26c0.01,0.01 0,0.03 0,0.03c-8.86,49.71 -51.31,84.66 -107.91,85.19c-111.09,1.05 -222.21,0.29 -333.32,0.29c0,0 -109.2,0.49 -163.79,0.49c0,0 -0.01,-0.01 -0.03,0c-48.3,0 -96.62,-0.04 -144.92,-0.17c-9.79,-0.03 -19.62,-0.32 -29.4,-0.9c-8.38,-0.47 -16.75,-1.19 -25.08,-2.15c-52.64,-6.06 -89.27,-38.11 -99.79,-85.57c0,-0.01 -0.01,-0.04 -0.01,-0.07c-1.91,-8.55 -2.95,-17.61 -3.1,-27.1c-0.69,-46.45 -0.54,-92.94 -0.26,-139.41v-0.19c0.03,-5.39 0.06,-10.76 0.1,-16.15c0.23,-33.27 4.4,-36.94 38.49,-37.67c17.29,-0.37 34.66,0.27 51.89,-1.06c103.35,-8.07 167.98,-114.53 122.18,-207.76c-22.77,-46.34 -62.96,-77.72 -119.02,-79.53c-22.75,-0.73 -45.52,-0.92 -68.29,-1.05c-16.91,-0.11 -25.09,-8.34 -25.03,-25.19c0.07,-18.83 -0.11,-37.69 -0.3,-56.53v-0.4c-0.33,-31.19 -0.64,-62.37 0.14,-93.5v-0.09c0.29,-11.75 1.6,-37.93 1.73,-39.28c0,0 0,-0.01 0,-0.03c5.53,-58.56 56.56,-92.89 115.32,-88.67c60.99,1.61 121.9,2.21 182.87,2.61c22.15,0.14 29.35,-13.14 30.51,-33.49c1.79,-31.7 2.45,-63.85 8.65,-94.8c8.88,-44.29 45.26,-86.63 104.39,-86.59c62.16,0.19 113.83,33 125.91,84.63c7.16,30.66 8.96,62.86 10.3,94.5c0.92,21.84 8.4,33.33 27.12,35.81h0.01c2.79,0.39 5.82,0.56 9.13,0.53c55.07,-0.4 110.13,-0.57 165.18,0.54c8.38,0.47 16.75,1.19 25.08,2.15c52.64,6.06 89.27,38.11 99.79,85.57c1.13,7.05 2.02,14.69 2.68,22.93c0.32,46.27 0.54,93.74 0.69,141.91v0.43C1455.08,1051.96 1454.88,1198.17 1454.65,1337.65z" android:strokeWidth="55">
|
||||||
|
<aapt:attr name="android:strokeColor">
|
||||||
|
<gradient android:endX="1436.4504" android:endY="668.0306"
|
||||||
|
android:startX="560.4707" android:startY="1544.0103" android:type="linear">
|
||||||
|
<item android:color="#FF3370FA" android:offset="1.065558E-7"/>
|
||||||
|
<item android:color="#FFF80439" android:offset="1"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
</vector>
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
<permission-tree
|
<permission-tree
|
||||||
android:name="com.mgoogle.android.googleapps.permission.GOOGLE_AUTH"
|
android:name="com.mgoogle.android.googleapps.permission.GOOGLE_AUTH"
|
||||||
android:icon="@drawable/ic_microg" />
|
android:icon="@mipmap/ic_launcher" />
|
||||||
|
|
||||||
<permission
|
<permission
|
||||||
android:name="org.mgoogle.gms.STATUS_BROADCAST"
|
android:name="org.mgoogle.gms.STATUS_BROADCAST"
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<application
|
<application
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:extractNativeLibs="true"
|
android:extractNativeLibs="true"
|
||||||
android:icon="@mipmap/ic_core_service_app"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="Vanced MicroG">
|
android:label="Vanced MicroG">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="fake-signature"
|
android:name="fake-signature"
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector android:height="30.287416dp" android:viewportHeight="1169.74"
|
||||||
android:width="24.386dp"
|
android:viewportWidth="965.533" android:width="25dp"
|
||||||
android:height="29.036dp"
|
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
android:viewportWidth="473.386"
|
<path android:fillColor="#000000"
|
||||||
android:viewportHeight="557.036">
|
android:pathData="m937.33,922.52c0.01,0.16 0.01,0.32 0,0.46 -0.04,31.65 2.1,100.42 -1.89,133.26 0.01,0.01 0,0.03 0,0.03 -8.86,49.71 -51.31,84.66 -107.91,85.19 -111.09,1.05 -222.21,0.29 -333.32,0.29 0,0 -109.2,0.49 -163.79,0.49 0,0 -0.01,-0.01 -0.03,0 -48.3,0 -96.62,-0.04 -144.92,-0.17 -9.79,-0.03 -19.62,-0.32 -29.4,-0.9 -8.38,-0.47 -16.75,-1.19 -25.08,-2.15 -52.64,-6.06 -89.27,-38.11 -99.79,-85.57 0,-0.01 -0.01,-0.04 -0.01,-0.07 -1.91,-8.55 -2.95,-17.61 -3.1,-27.1 -0.69,-46.45 -0.54,-92.94 -0.26,-139.41v-0.19c0.03,-5.39 0.06,-10.76 0.1,-16.15 0.23,-33.27 4.4,-36.94 38.49,-37.67 17.29,-0.37 34.66,0.27 51.89,-1.06 103.35,-8.07 167.98,-114.53 122.18,-207.76 -22.77,-46.34 -62.96,-77.72 -119.02,-79.53 -22.75,-0.73 -45.52,-0.92 -68.29,-1.05 -16.91,-0.11 -25.09,-8.34 -25.03,-25.19 0.07,-18.83 -0.11,-37.69 -0.3,-56.53v-0.4c-0.33,-31.19 -0.64,-62.37 0.14,-93.5v-0.09c0.29,-11.75 1.6,-37.93 1.73,-39.28 0,0 0,-0.01 0,-0.03 5.53,-58.56 56.56,-92.89 115.32,-88.67 60.99,1.61 121.9,2.21 182.87,2.61 22.15,0.14 29.35,-13.14 30.51,-33.49 1.79,-31.7 2.45,-63.85 8.65,-94.8 8.88,-44.29 45.26,-86.63 104.39,-86.59 62.16,0.19 113.83,33 125.91,84.63 7.16,30.66 8.96,62.86 10.3,94.5 0.92,21.84 8.4,33.33 27.12,35.81h0.01c2.79,0.39 5.82,0.56 9.13,0.53 55.07,-0.4 110.13,-0.57 165.18,0.54 8.38,0.47 16.75,1.19 25.08,2.15 52.64,6.06 89.27,38.11 99.79,85.57 1.13,7.05 2.02,14.69 2.68,22.93 0.32,46.27 0.54,93.74 0.69,141.91v0.43c0.41,140.33 0.21,286.54 -0.02,426.02z" android:strokeWidth="55">
|
||||||
<path
|
<aapt:attr name="android:strokeColor">
|
||||||
android:pathData="M139.41,39.069c39.938,-26.756 84.951,-37.87 132.018,-38.981c74.067,-1.745 139.224,22.666 194.91,72.066c7.828,6.945 9.084,10.983 0.811,18.827c-22.822,21.634 -44.75,44.216 -66.916,66.542c-4.849,4.89 -8.396,8.356 -15.723,2.227c-57.313,-47.931 -119.706,-51.276 -185.692,-19.974C179.015,106.203 159.215,72.637 139.41,39.069z"
|
<gradient android:endX="1436.4504" android:endY="668.0306"
|
||||||
android:fillColor="#039789"/>
|
android:startX="560.4707" android:startY="1544.0103" android:type="linear">
|
||||||
<path
|
<item android:color="#FF3370FA" android:offset="1.065558E-7"/>
|
||||||
android:pathData="M199.081,417.321c37.81,18.633 77.158,25.499 118.679,15.346c24.198,-5.917 45.923,-16.949 64.498,-33.468c7.241,-6.442 11.817,-6.348 18.602,0.667c22.291,23.056 45.144,45.575 67.979,68.096c4.856,4.793 6.874,8.052 0.704,13.929c-89.6,85.259 -230.801,98.396 -328.227,37.225C160.573,485.184 179.827,451.253 199.081,417.321z"
|
<item android:color="#FFF80439" android:offset="1"/>
|
||||||
android:fillColor="#E82164"/>
|
</gradient>
|
||||||
<path
|
</aapt:attr>
|
||||||
android:pathData="M199.081,417.321c-19.254,33.937 -38.507,67.863 -57.769,101.793c-68.704,-37.307 -110.968,-95.479 -131.542,-169.713c-12.953,-46.736 -13.189,-94.077 0.267,-141.071c6.208,1.257 12.485,2.259 18.618,3.817c31.91,8.117 63.782,16.378 95.667,24.588c-10.2,53.526 -2.1,102.705 33.953,145.522C170.033,396.209 185.033,406.161 199.081,417.321z"
|
</path>
|
||||||
android:fillColor="#FE9802"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M124.325,236.731c-31.888,-8.209 -63.757,-16.468 -95.667,-24.588c-6.133,-1.557 -12.41,-2.556 -18.617,-3.817c19.736,-74.299 61.695,-131.604 129.373,-169.257c19.804,33.565 39.609,67.13 59.41,100.702C162.543,163.294 137.997,195.836 124.325,236.731z"
|
|
||||||
android:fillColor="#CCDB3B"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
BIN
play-services-core/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
play-services-core/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
play-services-core/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
play-services-core/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
play-services-core/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
play-services-core/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
BIN
play-services-core/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
play-services-core/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
play-services-core/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
play-services-core/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Loading…
Reference in a new issue