show toast if user tries to update, but Data/WiFi settings disallow it
This commit is contained in:
		
							parent
							
								
									ac7916298a
								
							
						
					
					
						commit
						8503a625b5
					
				@ -123,6 +123,10 @@ public class UpdateService extends JobIntentService {
 | 
			
		||||
     * @see JobIntentService#enqueueWork(Context, Class, int, Intent)
 | 
			
		||||
     */
 | 
			
		||||
    private static void enqueueWork(Context context, @NonNull Intent intent) {
 | 
			
		||||
        if (!Preferences.get().isOnDemandDownloadAllowed()) {
 | 
			
		||||
            Toast.makeText(context, R.string.updates_disabled_by_settings, Toast.LENGTH_LONG).show();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        enqueueWork(context, UpdateService.class, JOB_ID, intent);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -129,6 +129,7 @@ This often occurs with apps installed via Google Play or other sources, if they
 | 
			
		||||
        <item quantity="one">Download update for %1$d app.</item>
 | 
			
		||||
        <item quantity="other">Download updates for %1$d apps.</item>
 | 
			
		||||
    </plurals>
 | 
			
		||||
    <string name="updates_disabled_by_settings">All updates disabled by Data/WiFi Settings</string>
 | 
			
		||||
 | 
			
		||||
    <string name="ok">OK</string>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user