From e6329fddc587f849ffa0805974af5ed0e99282b7 Mon Sep 17 00:00:00 2001 From: Oizaro <45825534+Oizaro@users.noreply.github.com> Date: Thu, 30 Jul 2020 16:22:25 +0200 Subject: [PATCH] Fix device registration pref and debloat --- README.md | 14 +- .../android/gms/ads/AdManagerCreator.aidl | 4 - .../internal/IAdvertisingIdService.aidl | 8 -- .../IGooglePlaceDetectionService.aidl | 5 - .../places/internal/IGooglePlacesService.aidl | 5 - .../android/gms/reminders/AccountState.aidl | 3 - .../CreateReminderOptionsInternal.aidl | 3 - .../gms/reminders/LoadRemindersOptions.aidl | 3 - .../gms/reminders/ReindexDueDatesOptions.aidl | 3 - .../reminders/UpdateRecurrenceOptions.aidl | 3 - .../internal/IRemindersCallbacks.aidl | 17 --- .../internal/IRemindersListener.aidl | 5 - .../reminders/internal/IRemindersService.aidl | 37 ----- .../model/CustomizedSnoozePresetEntity.aidl | 3 - .../gms/reminders/model/TaskEntity.aidl | 3 - .../gms/reminders/model/TaskIdEntity.aidl | 3 - .../tapandpay/internal/ITapAndPayService.aidl | 5 - .../gms/wallet/internal/IOwService.aidl | 5 - .../android/gms/reminders/AccountState.java | 23 ---- .../CreateReminderOptionsInternal.java | 23 ---- .../gms/reminders/LoadRemindersOptions.java | 23 ---- .../gms/reminders/ReindexDueDatesOptions.java | 23 ---- .../reminders/UpdateRecurrenceOptions.java | 23 ---- .../model/CustomizedSnoozePresetEntity.java | 23 ---- .../gms/reminders/model/TaskEntity.java | 23 ---- .../gms/reminders/model/TaskIdEntity.java | 23 ---- .../tools/selfcheck/PermissionCheckGroup.java | 77 ----------- .../tools/selfcheck/SelfCheckGroup.java | 41 ------ .../tools/ui/AbstractSelfCheckFragment.java | 128 ------------------ .../src/main/res/layout/self_check.xml | 30 ---- .../src/main/res/layout/self_check_entry.xml | 58 -------- .../src/main/res/layout/self_check_group.xml | 40 ------ .../analytics/service/AnalyticsService.java | 32 ----- .../org/microg/gms/checkin/CheckinPrefs.java | 2 +- 34 files changed, 11 insertions(+), 710 deletions(-) delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlaceDetectionService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlacesService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/tapandpay/internal/ITapAndPayService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/self_check.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/self_check_entry.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/self_check_group.xml delete mode 100644 play-services-core/src/main/java/com/google/android/gms/analytics/service/AnalyticsService.java diff --git a/README.md b/README.md index a7b9bcfa..8f070e1d 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,15 @@ This fork tweaks MicroG to be usable by applications that require Google authent - No longer a system app - Package name changed from `com.google.android.gms` to `com.mgoogle.android.gms` to support installation alongside the official MicroG - Removed unnecessary features: - - Maps & Location - - Wear-Api - - Safetynet - - Games + - Ads + - Analytics - Car + - Games + - Location + - Maps & Location + - SafetyNet + - Self-Check + - TapandPay + - Wallet + - Wear-Api - Removed all permissions, as none are required for Google authentication diff --git a/play-services-api/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl b/play-services-api/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl deleted file mode 100644 index 7e07dd01..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl +++ /dev/null @@ -1,4 +0,0 @@ -package com.google.android.gms.ads; - -interface AdManagerCreator { -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl deleted file mode 100644 index 5f4f5c1f..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.ads.identifier.internal; - -interface IAdvertisingIdService { - String getAdvertisingId() = 0; - boolean isAdTrackingLimited(boolean defaultHint) = 1; - String generateAdvertisingId(String packageName) = 2; - void setAdTrackingLimited(String packageName, boolean limited) = 3; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlaceDetectionService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlaceDetectionService.aidl deleted file mode 100644 index 39b0a53f..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlaceDetectionService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.location.places.internal; - -interface IGooglePlaceDetectionService { - -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlacesService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlacesService.aidl deleted file mode 100644 index 854e921e..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/location/places/internal/IGooglePlacesService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.location.places.internal; - -interface IGooglePlacesService { - -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl deleted file mode 100644 index 24ae0ffd..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders; - -parcelable AccountState; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl deleted file mode 100644 index 142ddedf..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders; - -parcelable CreateReminderOptionsInternal; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl deleted file mode 100644 index ff418443..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders; - -parcelable LoadRemindersOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl deleted file mode 100644 index 55ac1beb..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders; - -parcelable ReindexDueDatesOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl deleted file mode 100644 index 79f91dec..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders; - -parcelable UpdateRecurrenceOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl deleted file mode 100644 index 5e5506ee..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.android.gms.reminders.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.common.data.DataHolder; - -import com.google.android.gms.reminders.AccountState; - -interface IRemindersCallbacks { - void onDataHolder(in DataHolder data, in Status status) = 0; - void onStatus(in Status status) = 1; - void onNoStatus() = 2; - void onDataHolderNoStatus(in DataHolder data, in Status status) = 3; - void onBool(boolean b, in Status status) = 4; - void onString(in String s, in Status status) = 5; - void onAccountState(in AccountState accountState, in Status status) = 6; - void onAsyncDataHolder(in DataHolder data) = 7; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl deleted file mode 100644 index 2added91..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.reminders.internal; - -interface IRemindersListener { - -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl deleted file mode 100644 index f9986484..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl +++ /dev/null @@ -1,37 +0,0 @@ -package com.google.android.gms.reminders.internal; - -import com.google.android.gms.reminders.internal.IRemindersCallbacks; - -import com.google.android.gms.reminders.AccountState; -import com.google.android.gms.reminders.CreateReminderOptionsInternal; -import com.google.android.gms.reminders.LoadRemindersOptions; -import com.google.android.gms.reminders.ReindexDueDatesOptions; -import com.google.android.gms.reminders.UpdateRecurrenceOptions; -import com.google.android.gms.reminders.model.CustomizedSnoozePresetEntity; -import com.google.android.gms.reminders.model.TaskEntity; -import com.google.android.gms.reminders.model.TaskIdEntity; - -interface IRemindersService { - void loadReminders(IRemindersCallbacks callbacks, in LoadRemindersOptions options) = 0; - void addListener(IRemindersCallbacks callbacks) = 1; - void createReminder(IRemindersCallbacks callbacks, in TaskEntity task) = 2; - void updateReminder(IRemindersCallbacks callbacks, in TaskEntity task) = 3; - void deleteReminder(IRemindersCallbacks callbacks, in TaskIdEntity taskId) = 4; - void bumpReminder(IRemindersCallbacks callbacks, in TaskIdEntity taskId) = 5; - void hasUpcomingReminders(IRemindersCallbacks callbacks) = 6; - void createRecurrence(IRemindersCallbacks callbacks, in TaskEntity task) = 7; - void updateRecurrence(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 8; - void deleteRecurrence(IRemindersCallbacks callbacks, String s1, in UpdateRecurrenceOptions options) = 9; - void changeRecurrence(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 10; - void makeTaskRecurring(IRemindersCallbacks callbacks, in TaskEntity task) = 11; - void makeRecurrenceSingleInstance(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 12; - void clearListeners() = 13; - void batchUpdateReminders(IRemindersCallbacks callbacks, in List tasks) = 14; - void createReminderWithOptions(IRemindersCallbacks callbacks, in TaskEntity task, in CreateReminderOptionsInternal options) = 15; - void getCustomizedSnoozePreset(IRemindersCallbacks callbacks) = 16; - void setCustomizedSnoozePreset(IRemindersCallbacks callbacks, in CustomizedSnoozePresetEntity preset) = 17; - void setAccountState(IRemindersCallbacks callbacks, in AccountState accountState) = 18; - void getAccountState(IRemindersCallbacks callbacks) = 19; - void checkReindexDueDatesNeeded(IRemindersCallbacks callbacks, in ReindexDueDatesOptions options) = 20; - void reindexDueDates(IRemindersCallbacks callbacks, in ReindexDueDatesOptions options) = 21; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl deleted file mode 100644 index bbb90836..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders.model; - -parcelable CustomizedSnoozePresetEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl deleted file mode 100644 index 9a3883c2..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders.model; - -parcelable TaskEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl deleted file mode 100644 index a4c41481..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.reminders.model; - -parcelable TaskIdEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/tapandpay/internal/ITapAndPayService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/tapandpay/internal/ITapAndPayService.aidl deleted file mode 100644 index 622b0ba7..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/tapandpay/internal/ITapAndPayService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.tapandpay.internal; - -interface ITapAndPayService { - -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl deleted file mode 100644 index d9cb9209..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.wallet.internal; - -interface IOwService { - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java b/play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java deleted file mode 100644 index 4ad0101f..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AccountState extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(AccountState.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java b/play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java deleted file mode 100644 index cc0d81c6..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class CreateReminderOptionsInternal extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(CreateReminderOptionsInternal.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java b/play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java deleted file mode 100644 index fd69c55a..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class LoadRemindersOptions extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(LoadRemindersOptions.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java b/play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java deleted file mode 100644 index e6a4eba3..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ReindexDueDatesOptions extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(ReindexDueDatesOptions.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java b/play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java deleted file mode 100644 index ae708746..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class UpdateRecurrenceOptions extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(UpdateRecurrenceOptions.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java b/play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java deleted file mode 100644 index 29ee864e..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders.model; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class CustomizedSnoozePresetEntity extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(CustomizedSnoozePresetEntity.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java b/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java deleted file mode 100644 index 4062335a..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders.model; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class TaskEntity extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(TaskEntity.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java b/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java deleted file mode 100644 index 1816b1f3..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.reminders.model; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class TaskIdEntity extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(TaskIdEntity.class); -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java deleted file mode 100644 index 22543802..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package org.microg.tools.selfcheck; - -import android.annotation.TargetApi; -import android.content.Context; -import android.content.pm.PackageManager; -import android.content.pm.PermissionGroupInfo; -import android.content.pm.PermissionInfo; -import android.util.Log; - -import androidx.fragment.app.Fragment; - -import org.microg.tools.ui.R; - -import static android.os.Build.VERSION_CODES.M; -import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Negative; -import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Positive; - -@TargetApi(M) -public class PermissionCheckGroup implements SelfCheckGroup { - private static final String TAG = "SelfCheckPerms"; - - private String[] permissions; - - public PermissionCheckGroup(String... permissions) { - this.permissions = permissions; - } - - @Override - public String getGroupName(Context context) { - return context.getString(R.string.self_check_cat_permissions); - } - - @Override - public void doChecks(Context context, ResultCollector collector) { - for (String permission : permissions) { - doPermissionCheck(context, collector, permission); - } - } - - private void doPermissionCheck(Context context, ResultCollector collector, final String permission) { - PackageManager pm = context.getPackageManager(); - try { - PermissionInfo info = pm.getPermissionInfo(permission, 0); - PermissionGroupInfo groupInfo = info.group != null ? pm.getPermissionGroupInfo(info.group, 0) : null; - CharSequence permLabel = info.loadLabel(pm); - CharSequence groupLabel = groupInfo != null ? groupInfo.loadLabel(pm) : permLabel; - collector.addResult(context.getString(R.string.self_check_name_permission, permLabel), - context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED ? Positive : Negative, - context.getString(R.string.self_check_resolution_permission, groupLabel), - new SelfCheckGroup.CheckResolver() { - - @Override - public void tryResolve(Fragment fragment) { - fragment.requestPermissions(new String[]{permission}, 0); - } - }); - } catch (PackageManager.NameNotFoundException e) { - Log.w(TAG, e); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java deleted file mode 100644 index 13828574..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package org.microg.tools.selfcheck; - -import android.content.Context; - -import androidx.fragment.app.Fragment; - -public interface SelfCheckGroup { - String getGroupName(Context context); - - void doChecks(Context context, ResultCollector collector); - - interface ResultCollector { - void addResult(String name, Result value, String resolution); - - void addResult(String name, Result value, String resolution, CheckResolver resolver); - } - - interface CheckResolver { - void tryResolve(Fragment fragment); - } - - enum Result { - Positive, Negative, Unknown - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java deleted file mode 100644 index ab05ab8f..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package org.microg.tools.ui; - -import android.os.Bundle; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewGroup; -import android.widget.CheckBox; -import android.widget.TextView; - -import androidx.annotation.Nullable; -import androidx.fragment.app.Fragment; - -import org.microg.tools.selfcheck.SelfCheckGroup; - -import java.util.ArrayList; -import java.util.List; - -import static android.view.View.GONE; -import static android.view.View.INVISIBLE; -import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Negative; -import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Positive; -import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Unknown; - -public abstract class AbstractSelfCheckFragment extends Fragment { - private static final String TAG = "SelfCheck"; - - private ViewGroup root; - - @Nullable - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View scrollRoot = inflater.inflate(R.layout.self_check, container, false); - root = (ViewGroup) scrollRoot.findViewById(R.id.self_check_root); - reset(inflater); - return scrollRoot; - } - - protected abstract void prepareSelfCheckList(List checks); - - protected void reset(LayoutInflater inflater) { - List selfCheckGroupList = new ArrayList(); - prepareSelfCheckList(selfCheckGroupList); - - root.removeAllViews(); - for (SelfCheckGroup group : selfCheckGroupList) { - View groupView = inflater.inflate(R.layout.self_check_group, root, false); - ((TextView) groupView.findViewById(android.R.id.title)).setText(group.getGroupName(getContext())); - final ViewGroup viewGroup = (ViewGroup) groupView.findViewById(R.id.group_content); - final SelfCheckGroup.ResultCollector collector = new GroupResultCollector(viewGroup); - try { - group.doChecks(getContext(), collector); - } catch (Exception e) { - Log.w(TAG, "Failed during check " + group.getGroupName(getContext()), e); - collector.addResult("Self-check failed:", Negative, "An exception occurred during self-check. Please report this issue."); - } - root.addView(groupView); - } - } - - private class GroupResultCollector implements SelfCheckGroup.ResultCollector { - private final ViewGroup viewGroup; - - public GroupResultCollector(ViewGroup viewGroup) { - this.viewGroup = viewGroup; - } - - @Override - public void addResult(final String name, final SelfCheckGroup.Result result, final String resolution) { - addResult(name, result, resolution, null); - } - - @Override - public void addResult(final String name, final SelfCheckGroup.Result result, final String resolution, - final SelfCheckGroup.CheckResolver resolver) { - if (result == null || getActivity() == null) return; - getActivity().runOnUiThread(new Runnable() { - @Override - public void run() { - View resultEntry = LayoutInflater.from(getContext()).inflate(R.layout.self_check_entry, viewGroup, false); - ((TextView) resultEntry.findViewById(R.id.self_check_name)).setText(name); - resultEntry.findViewById(R.id.self_check_result).setOnTouchListener(new View.OnTouchListener() { - @Override - public boolean onTouch(View v, MotionEvent event) { - return true; - } - }); - if (result == Positive) { - ((CheckBox) resultEntry.findViewById(R.id.self_check_result)).setChecked(true); - resultEntry.findViewById(R.id.self_check_resolution).setVisibility(GONE); - } else { - ((TextView) resultEntry.findViewById(R.id.self_check_resolution)).setText(resolution); - if (result == Unknown) { - resultEntry.findViewById(R.id.self_check_result).setVisibility(INVISIBLE); - } - if (resolver != null) { - resultEntry.setClickable(true); - resultEntry.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - resolver.tryResolve(AbstractSelfCheckFragment.this); - } - }); - } - } - viewGroup.addView(resultEntry); - } - }); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/self_check.xml b/play-services-core/microg-ui-tools/src/main/res/layout/self_check.xml deleted file mode 100644 index 40370351..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/self_check.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/self_check_entry.xml b/play-services-core/microg-ui-tools/src/main/res/layout/self_check_entry.xml deleted file mode 100644 index da3d743c..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/self_check_entry.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/self_check_group.xml b/play-services-core/microg-ui-tools/src/main/res/layout/self_check_group.xml deleted file mode 100644 index 3f97b14b..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/self_check_group.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/play-services-core/src/main/java/com/google/android/gms/analytics/service/AnalyticsService.java b/play-services-core/src/main/java/com/google/android/gms/analytics/service/AnalyticsService.java deleted file mode 100644 index 5cb38bc2..00000000 --- a/play-services-core/src/main/java/com/google/android/gms/analytics/service/AnalyticsService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2013-2017 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. - */ - -package com.google.android.gms.analytics.service; - -import android.app.Service; -import android.content.Intent; -import android.os.IBinder; -import android.util.Log; - -public class AnalyticsService extends Service { - private static final String TAG = "GmsAnalyticsSvc"; - - @Override - public IBinder onBind(Intent intent) { - Log.d(TAG, "onBind: " + intent); - return null; - } -} diff --git a/play-services-core/src/main/java/org/microg/gms/checkin/CheckinPrefs.java b/play-services-core/src/main/java/org/microg/gms/checkin/CheckinPrefs.java index f090c97e..c6172bdb 100755 --- a/play-services-core/src/main/java/org/microg/gms/checkin/CheckinPrefs.java +++ b/play-services-core/src/main/java/org/microg/gms/checkin/CheckinPrefs.java @@ -34,7 +34,7 @@ public class CheckinPrefs implements SharedPreferences.OnSharedPreferenceChangeL } private void update() { - checkinEnabled = preferences.getBoolean(PREF_ENABLE_CHECKIN, false); + checkinEnabled = preferences.getBoolean(PREF_ENABLE_CHECKIN, true); } @Override