Loading play-services-core/src/main/java/org/microg/gms/gcm/McsService.java +6 −3 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.os.Parcelable; import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.util.Base64; import android.util.Log; import androidx.annotation.Nullable; Loading Loading @@ -549,15 +550,17 @@ public class McsService extends Service implements Handler.Callback { intent.setAction(ACTION_C2DM_RECEIVE); intent.putExtra(EXTRA_FROM, msg.from); intent.putExtra(EXTRA_MESSAGE_ID, msg.id); if (msg.persistent_id != null) { intent.putExtra(EXTRA_MESSAGE_ID, msg.persistent_id); if (msg.persistent_id != null) intent.putExtra(EXTRA_MESSAGE_ID, msg.persistent_id); if (msg.token != null) intent.putExtra(EXTRA_COLLAPSE_KEY, msg.token); if (msg.raw_data != null) { intent.putExtra(EXTRA_RAWDATA_BASE64, Base64.encodeToString(msg.raw_data.toByteArray(), Base64.DEFAULT)); intent.putExtra(EXTRA_RAWDATA, msg.raw_data.toByteArray()); } if (app.wakeForDelivery) { intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); } else { intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES); } if (msg.token != null) intent.putExtra(EXTRA_COLLAPSE_KEY, msg.token); for (AppData appData : msg.app_data) { intent.putExtra(appData.key, appData.value_); } Loading play-services-core/src/main/java/org/microg/gms/gcm/PushRegisterManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ public class PushRegisterManager { resultBundle.putString(EXTRA_REGISTRATION_ID, attachRequestId(response.token, requestId)); } } else { if (!request.app.equals(response.deleted) && !request.app.equals(response.token)) { if (!request.app.equals(response.deleted) && !request.app.equals(response.token) && !request.sender.equals(response.token)) { database.noteAppRegistrationError(request.app, response.responseText); resultBundle.putString(EXTRA_ERROR, attachRequestId(ERROR_SERVICE_NOT_AVAILABLE, requestId)); } else { Loading play-services-core/src/main/res/xml/preferences_gcm_advanced.xml +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ <SwitchPreference android:defaultValue="false" android:persistent="false" android:key="gcm_confirm_new_apps" android:summary="@string/pref_gcm_confirm_new_apps_summary" android:title="@string/pref_gcm_confirm_new_apps_title"/> Loading @@ -29,6 +30,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_mobile" Loading @@ -37,6 +39,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_wifi" Loading @@ -45,6 +48,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_roaming" Loading @@ -53,6 +57,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_other" Loading Loading
play-services-core/src/main/java/org/microg/gms/gcm/McsService.java +6 −3 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.os.Parcelable; import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.util.Base64; import android.util.Log; import androidx.annotation.Nullable; Loading Loading @@ -549,15 +550,17 @@ public class McsService extends Service implements Handler.Callback { intent.setAction(ACTION_C2DM_RECEIVE); intent.putExtra(EXTRA_FROM, msg.from); intent.putExtra(EXTRA_MESSAGE_ID, msg.id); if (msg.persistent_id != null) { intent.putExtra(EXTRA_MESSAGE_ID, msg.persistent_id); if (msg.persistent_id != null) intent.putExtra(EXTRA_MESSAGE_ID, msg.persistent_id); if (msg.token != null) intent.putExtra(EXTRA_COLLAPSE_KEY, msg.token); if (msg.raw_data != null) { intent.putExtra(EXTRA_RAWDATA_BASE64, Base64.encodeToString(msg.raw_data.toByteArray(), Base64.DEFAULT)); intent.putExtra(EXTRA_RAWDATA, msg.raw_data.toByteArray()); } if (app.wakeForDelivery) { intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); } else { intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES); } if (msg.token != null) intent.putExtra(EXTRA_COLLAPSE_KEY, msg.token); for (AppData appData : msg.app_data) { intent.putExtra(appData.key, appData.value_); } Loading
play-services-core/src/main/java/org/microg/gms/gcm/PushRegisterManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ public class PushRegisterManager { resultBundle.putString(EXTRA_REGISTRATION_ID, attachRequestId(response.token, requestId)); } } else { if (!request.app.equals(response.deleted) && !request.app.equals(response.token)) { if (!request.app.equals(response.deleted) && !request.app.equals(response.token) && !request.sender.equals(response.token)) { database.noteAppRegistrationError(request.app, response.responseText); resultBundle.putString(EXTRA_ERROR, attachRequestId(ERROR_SERVICE_NOT_AVAILABLE, requestId)); } else { Loading
play-services-core/src/main/res/xml/preferences_gcm_advanced.xml +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ <SwitchPreference android:defaultValue="false" android:persistent="false" android:key="gcm_confirm_new_apps" android:summary="@string/pref_gcm_confirm_new_apps_summary" android:title="@string/pref_gcm_confirm_new_apps_title"/> Loading @@ -29,6 +30,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_mobile" Loading @@ -37,6 +39,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_wifi" Loading @@ -45,6 +48,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_roaming" Loading @@ -53,6 +57,7 @@ <ListPreference android:defaultValue="0" android:persistent="false" android:entries="@array/gcm_network_config_names" android:entryValues="@array/gcm_network_config_values" android:key="gcm_network_other" Loading