daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Aug 15th, 2018 51 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. package com.vlingo.client.widget;
  2.  
  3. import android.app.PendingIntent;
  4. import android.appwidget.AppWidgetManager;
  5. import android.appwidget.AppWidgetProvider;
  6. import android.content.ComponentName;
  7. import android.content.Context;
  8. import android.content.Intent;
  9. import android.widget.RemoteViews;
  10. import com.vlingo.client.safereader.SafeReaderService;
  11.  
  12. public class SafeReaderWidget extends AppWidgetProvider
  13. {
  14.   private static RemoteViews buildWidgetView(Context paramContext, boolean paramBoolean)
  15.   {
  16.     RemoteViews localRemoteViews = new RemoteViews(paramContext.getPackageName(), 2130903176);
  17.     Intent localIntent = new Intent("com.vlingo.client.safereader.ACTION_TOGGLE_SAFEREADER");
  18.     localIntent.setComponent(new ComponentName(paramContext, SafeReaderService.class));
  19.     localIntent.putExtra("com.vlingo.client.safereader.EXTRA_QUIET", false);
  20.     localIntent.putExtra("com.vlingo.client.safereader.EXTRA_STICKY", true);
  21.     localRemoteViews.setOnClickPendingIntent(2131624314, PendingIntent.getService(paramContext, 0, localIntent, 0));
  22.     if (paramBoolean);
  23.     for (int i = 2130837729; ; i = 2130837728)
  24.     {
  25.       localRemoteViews.setImageViewResource(2131624314, i);
  26.       return localRemoteViews;
  27.     }
  28.   }
  29.  
  30.   static void updateWidgets(Context paramContext, int[] paramArrayOfInt, boolean paramBoolean)
  31.   {
  32.     AppWidgetManager localAppWidgetManager = AppWidgetManager.getInstance(paramContext);
  33.     RemoteViews localRemoteViews = buildWidgetView(paramContext, paramBoolean);
  34.     if (paramArrayOfInt == null)
  35.       localAppWidgetManager.updateAppWidget(new ComponentName(paramContext, SafeReaderWidget.class), localRemoteViews);
  36.     while (true)
  37.     {
  38.       return;
  39.       localAppWidgetManager.updateAppWidget(paramArrayOfInt, localRemoteViews);
  40.     }
  41.   }
  42.  
  43.   public void onUpdate(Context paramContext, AppWidgetManager paramAppWidgetManager, int[] paramArrayOfInt)
  44.   {
  45.     super.onUpdate(paramContext, paramAppWidgetManager, paramArrayOfInt);
  46.     updateWidgets(paramContext, paramArrayOfInt, false);
  47.     WidgetManager.requestSafeReaderStatus(paramContext, paramArrayOfInt);
  48.   }
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top