|
35 | 35 | import com.d4rk.androidtutorials.java.R; |
36 | 36 | import com.d4rk.androidtutorials.java.ads.AdUtils; |
37 | 37 | import com.d4rk.androidtutorials.java.databinding.ActivityMainBinding; |
38 | | -import com.d4rk.androidtutorials.java.notifications.managers.AppUpdateNotificationsManager; |
39 | | -import com.d4rk.androidtutorials.java.notifications.managers.AppUsageNotificationsManager; |
40 | 38 | import com.d4rk.androidtutorials.java.startup.StartupInitializer; |
41 | 39 | import com.d4rk.androidtutorials.java.ui.components.navigation.BottomSheetMenuFragment; |
42 | 40 | import com.d4rk.androidtutorials.java.ui.screens.startup.StartupActivity; |
@@ -87,7 +85,6 @@ public void onResume(@NonNull LifecycleOwner owner) { |
87 | 85 | private NavController navController; |
88 | 86 | private int currentNavIndex; |
89 | 87 | private AppUpdateManager appUpdateManager; |
90 | | - private AppUpdateNotificationsManager appUpdateNotificationsManager; |
91 | 88 | private InstallStateUpdatedListener installStateUpdatedListener; |
92 | 89 | private long backPressedTime; |
93 | 90 |
|
@@ -149,7 +146,6 @@ protected void onCreate(Bundle savedInstanceState) { |
149 | 146 | } |
150 | 147 |
|
151 | 148 | this.appUpdateManager = mainViewModel.getAppUpdateManager(); |
152 | | - setupUpdateNotifications(); |
153 | 149 |
|
154 | 150 | registerInstallStateListener(); |
155 | 151 | getLifecycle().addObserver(lifecycleObserver); |
@@ -319,11 +315,6 @@ public boolean onOptionsItemSelected(android.view.MenuItem item) { |
319 | 315 | @Override |
320 | 316 | protected void onResume() { |
321 | 317 | super.onResume(); |
322 | | - AppUsageNotificationsManager appUsageNotificationsManager = new AppUsageNotificationsManager(this); |
323 | | - appUsageNotificationsManager.scheduleAppUsageCheck(); |
324 | | - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
325 | | - appUpdateNotificationsManager.checkAndSendUpdateNotification(); |
326 | | - } |
327 | 318 | checkForFlexibleOrImmediateUpdate(); |
328 | 319 | } |
329 | 320 |
|
@@ -380,10 +371,6 @@ private void startImmediateUpdate(AppUpdateInfo appUpdateInfo) { |
380 | 371 | } |
381 | 372 | } |
382 | 373 |
|
383 | | - private void setupUpdateNotifications() { |
384 | | - appUpdateNotificationsManager = new AppUpdateNotificationsManager(this); |
385 | | - } |
386 | | - |
387 | 374 | private void registerInstallStateListener() { |
388 | 375 | installStateUpdatedListener = state -> { |
389 | 376 | if (state.installStatus() == InstallStatus.DOWNLOADED) { |
|
0 commit comments