Esempio n. 1
0
 public void run() {
   try {
     Object obj = new AuthorizationCredentials(mUser.netflixId, mUser.secureNetflixId);
     Object obj1 = getCommonRequestParameters(mContext);
     obj1 =
         getEvents(
             mUser.esn,
             ((CommonRequestParameters) (obj1)),
             ((AuthorizationCredentials) (obj)),
             mDepplinkParams);
     obj =
         new CustomerEventCommand(
             mUser.esn, ((AuthorizationCredentials) (obj)), ((JSONArray) (obj1)).toString());
     Log.d("nf_rest", "Executing MdpFromDeepLink WebAPI call start");
     obj = ((CustomerEventCommand) (obj)).execute();
     Log.d("nf_rest", "Executing MdpFromDeepLink WebAPI call done");
     if (Log.isLoggable("nf_rest", 3)) {
       Log.d(
           "nf_rest",
           (new StringBuilder())
               .append("MdpFromDeepLink response: ")
               .append(((String) (obj)))
               .toString());
     }
     return;
   } catch (Throwable throwable) {
     Log.e("nf_rest", "Failed to execute MdpFromDeepLink call!", throwable);
   }
 }
    public void setPreferredLanguages(String s)
    {
        String s1;
label0:
        {
            if (s != null)
            {
                s1 = s;
                if (!"".equals(s.trim()))
                {
                    break label0;
                }
            }
            Log.e("nf_loc", "Empty list of preferred languages, set to default");
            s1 = "";
        }
        preferredLanguages = s1;
        UserLocale userlocale = findBestMatch(s1);
        s = userlocale;
        if (userlocale == null)
        {
            Log.w("nf_loc", (new StringBuilder()).append("Match is not found under application supported languages for prefered languages: ").append(s1).append(". Default to ").append(defaultAppLocale).toString());
            s = defaultAppLocale;
        }
        setApplicationLanguage(s);
    }
 public CreateAccountCompleteCommand(JSONObject jsonobject) throws JSONException {
   super("createdAccount", jsonobject);
   created = false;
   key = -1;
   Log.d("nf_reg", "CreateAccountCompleteCommand constructor");
   localPopulate(jsonobject);
 }
 public void setApplicationLanguage(UserLocale userlocale)
 {
     if (currentAppLocale != null && currentAppLocale.equals(userlocale))
     {
         if (Log.isLoggable("nf_loc", 3))
         {
             Log.d("nf_loc", (new StringBuilder()).append("Keeping same application locale ").append(currentAppLocale.getRaw()).toString());
         }
         return;
     }
     if (Log.isLoggable("nf_loc", 3))
     {
         Log.d("nf_loc", (new StringBuilder()).append("Change locale from ").append(currentAppLocale).append(" to ").append(userlocale).toString());
     }
     currentAppLocale = userlocale;
 }
    private void initSupportedLocales()
    {
        supportedLocales = new UserLocale[12];
        defaultAppLocale = new UserLocale(Locale.ENGLISH.getLanguage(), null, "English");
        supportedLocales[0] = defaultAppLocale;
        supportedLocales[1] = new UserLocale(Locale.FRENCH.getLanguage(), null, "Fran\347ais");
        supportedLocales[2] = new UserLocale("es", null, "Espa\361ol");
        supportedLocales[3] = new UserLocale("pt", null, "Portugu\352s");
        supportedLocales[4] = new UserLocale(Locale.UK.getLanguage(), Locale.UK.getCountry(), "English-GB");
        supportedLocales[5] = new UserLocale("sv", null, "Svenskt");
        supportedLocales[6] = new UserLocale("nb", null, "Norske");
        supportedLocales[7] = new UserLocale("da", null, "Dansk");
        supportedLocales[8] = new UserLocale("fi", null, "Suomi");
        supportedLocales[9] = new UserLocale("nl", null, "Nederlands");
        supportedLocales[10] = new UserLocale(Locale.FRENCH.getLanguage(), Locale.CANADA.getCountry(), "Fran\347ais-CA");
        supportedLocales[11] = new UserLocale(Locale.GERMAN.getLanguage(), null, "Deutsch");
        UserLocale auserlocale[] = supportedLocales;
        int j = auserlocale.length;
        for (int i = 0; i < j; i++)
        {
            UserLocale userlocale = auserlocale[i];
            Log.d("nf_loc", (new StringBuilder()).append("").append(userlocale).toString());
        }

    }
Esempio n. 6
0
 public void setSelection(int i) {
   Log.v(
       "SeasonsSpinner",
       (new StringBuilder()).append("Setting selection to position: ").append(i).toString());
   super.setSelection(i);
   if (itemSelectedListener != null) {
     itemSelectedListener.onItemSelected(this, this, i, getSelectedItemId());
   }
 }
Esempio n. 7
0
 public void setSelectionWithoutCallback(int i) {
   Log.v(
       "SeasonsSpinner",
       (new StringBuilder())
           .append("Setting selection (no callback) to position: ")
           .append(i)
           .toString());
   super.setSelection(i);
 }
 public FetchConnectWithFacebookRequest(
     Context context,
     com.netflix.mediaclient.service.ServiceAgent.ConfigurationAgentInterface
         configurationagentinterface,
     String s,
     UserAgentWebCallback useragentwebcallback) {
   super(context, configurationagentinterface);
   mAccessToken = s;
   responseCallback = useragentwebcallback;
   pqlQuery =
       (new StringBuilder("['connectWithFacebook', '"))
           .append(mAccessToken)
           .append("']")
           .toString();
   if (Log.isLoggable("nf_service_user_fetchwebuserrequest", 2)) {
     Log.v(
         "nf_service_user_fetchwebuserrequest",
         (new StringBuilder()).append("PQL = ").append(pqlQuery).toString());
   }
 }
 public boolean isCreatedSuccess() {
   Log.d(
       "nf_reg",
       (new StringBuilder())
           .append("populated: ")
           .append(result)
           .append(" created:")
           .append(created)
           .append(" key")
           .append(key)
           .toString());
   return created;
 }
 protected String parseFalcorResponse(String s)
     throws FalcorParseException, FalcorServerException {
   if (Log.isLoggable("nf_service_user_fetchwebuserrequest", 2)) {
     Log.v(
         "nf_service_user_fetchwebuserrequest",
         (new StringBuilder()).append("String response to parse = ").append(s).toString());
   }
   JsonObject jsonobject = FalcorParseUtils.getDataObj("nf_service_user_fetchwebuserrequest", s);
   if (FalcorParseUtils.isEmpty(jsonobject)) {
     throw new FalcorParseException("UserConnectWith empty!!!");
   }
   try {
     jsonobject = jsonobject.getAsJsonObject("user");
   } catch (Exception exception) {
     Log.v(
         "nf_service_user_fetchwebuserrequest",
         (new StringBuilder()).append("String response to parse = ").append(s).toString());
     throw new FalcorParseException("response missing user json objects", exception);
   }
   s =
       (com.netflix.mediaclient.service.webclient.model.leafs.UserProfile.Operation)
           FalcorParseUtils.getPropertyObject(
               jsonobject,
               "operation",
               com
                   / netflix
                   / mediaclient
                   / service
                   / webclient
                   / model
                   / leafs
                   / UserProfile$Operation);
   if (s != null) {
     return ((com.netflix.mediaclient.service.webclient.model.leafs.UserProfile.Operation) (s))
         .status;
   } else {
     return new String("400");
   }
 }
 public void onVideoRatingSet(int i)
 {
     INetflixServiceCallback inetflixservicecallback = (INetflixServiceCallback)NetflixService.access$1400(NetflixService.this)._mth0(clientId);
     if (inetflixservicecallback == null)
     {
         Log.w("NetflixService", "No client callback found for onVideoRatingSet");
         return;
     } else
     {
         inetflixservicecallback.onVideoRatingSet(requestId, i);
         return;
     }
 }
 public void onGenreLoLoMoPrefetched(int i)
 {
     INetflixServiceCallback inetflixservicecallback = (INetflixServiceCallback)NetflixService.access$1400(NetflixService.this)._mth0(clientId);
     if (inetflixservicecallback == null)
     {
         Log.w("NetflixService", "No client callback found for client onGenreLoLoMoPrefetched");
         return;
     } else
     {
         inetflixservicecallback.onGenreLoLoMoPrefetched(requestId, i);
         return;
     }
 }
    private UserLocale[] toUserLocales(String s)
    {
        s = new StringTokenizer(s, ",");
        if (s.countTokens() < 1)
        {
            return new UserLocale[0];
        }
        UserLocale auserlocale[] = new UserLocale[s.countTokens()];
        int j;
        for (int i = 0; s.hasMoreTokens(); i = j)
        {
            UserLocale userlocale = new UserLocale(s.nextToken());
            j = i + 1;
            auserlocale[i] = userlocale;
            if (Log.isLoggable("nf_loc", 3))
            {
                Log.d("nf_loc", (new StringBuilder()).append("Preffered locale ").append(j).append(":").append(userlocale).toString());
            }
        }

        return auserlocale;
    }
 public void onEpisodesFetched(List list, int i)
 {
     INetflixServiceCallback inetflixservicecallback = (INetflixServiceCallback)NetflixService.access$1400(NetflixService.this)._mth0(clientId);
     if (inetflixservicecallback == null)
     {
         Log.w("NetflixService", "No client callback found for onEpisodesFetched");
         return;
     } else
     {
         inetflixservicecallback.onEpisodesFetched(requestId, list, i);
         return;
     }
 }
 public void onShowDetailsFetched(ShowDetails showdetails, int i)
 {
     INetflixServiceCallback inetflixservicecallback = (INetflixServiceCallback)NetflixService.access$1400(NetflixService.this)._mth0(clientId);
     if (inetflixservicecallback == null)
     {
         Log.w("NetflixService", "No client callback found for onShowDetailsFetched");
         return;
     } else
     {
         inetflixservicecallback.onShowDetailsFetched(requestId, showdetails, i);
         return;
     }
 }
 public void onKidsCharacterDetailsFetched(KidsCharacterDetails kidscharacterdetails, Boolean boolean1, int i)
 {
     INetflixServiceCallback inetflixservicecallback = (INetflixServiceCallback)NetflixService.access$1400(NetflixService.this)._mth0(clientId);
     if (inetflixservicecallback == null)
     {
         Log.w("NetflixService", "No client callback found for onKidsCharacterDetailsFetched");
         return;
     } else
     {
         inetflixservicecallback.onKidsCharacterDetailsFetched(requestId, kidscharacterdetails, boolean1, i);
         return;
     }
 }
 public void reset()
 {
     this;
     JVM INSTR monitorenter ;
     Log.d("nf_loc", "reset");
     preferredLanguages = null;
     currentAppLocale = null;
     this;
     JVM INSTR monitorexit ;
     return;
     Exception exception;
     exception;
     throw exception;
 }
Esempio n. 18
0
 private void setArguments(String s)
 {
     JSONObject jsonobject = new JSONObject();
     try
     {
         jsonobject.put("uuid", s);
         arguments = jsonobject.toString();
         return;
     }
     // Misplaced declaration of an exception variable
     catch (String s) { }
     break MISSING_BLOCK_LABEL_26;
     s;
     Log.e("nf_invoke", "Failed to create JSON object", s);
     return;
 }
 protected void localPopulate(JSONObject jsonobject) throws JSONException {
   String s = getString(jsonobject, "result", "ERROR");
   created = s.equals("COMPLETE");
   if (created) {
     key = getInt(jsonobject, "key", -1);
   }
   Log.d(
       "nf_reg",
       (new StringBuilder())
           .append("populated: ")
           .append(s)
           .append(" created:")
           .append(created)
           .append(" key")
           .append(key)
           .toString());
 }
Esempio n. 20
0
 public static String getStringPref(Context context, String s, String s1)
 {
     if (!validate(context, s))
     {
         return s1;
     }
     try
     {
         context = context.getSharedPreferences("nfxpref", 0).getString(s, s1);
     }
     // Misplaced declaration of an exception variable
     catch (Context context)
     {
         Log.e("nfxpref", "Failed to get preferences!", context);
         return s1;
     }
     return context;
 }
Esempio n. 21
0
    public static boolean putBooleanPref(Context context, String s, boolean flag)
    {
        boolean flag1;
        flag1 = false;
        if (!validate(context, s))
        {
            return false;
        }
        context = context.getSharedPreferences("nfxpref", 0).edit();
        context.putBoolean(s, flag);
        context.commit();
        flag = true;
_L2:
        return flag;
        context;
        Log.e("nfxpref", "Failed to save to preferences!", context);
        flag = flag1;
        if (true) goto _L2; else goto _L1
Esempio n. 22
0
 public static boolean getBooleanPref(Context context, String s, boolean flag)
 {
     if (!validate(context, s))
     {
         return flag;
     }
     boolean flag1;
     try
     {
         flag1 = context.getSharedPreferences("nfxpref", 0).getBoolean(s, flag);
     }
     // Misplaced declaration of an exception variable
     catch (Context context)
     {
         Log.e("nfxpref", "Failed to get preferences!", context);
         return flag;
     }
     return flag1;
 }
Esempio n. 23
0
 public static float getFloatPref(Context context, String s, float f)
 {
     if (!validate(context, s))
     {
         return f;
     }
     float f1;
     try
     {
         f1 = context.getSharedPreferences("nfxpref", 0).getFloat(s, f);
     }
     // Misplaced declaration of an exception variable
     catch (Context context)
     {
         Log.e("nfxpref", "Failed to get preferences!", context);
         return f;
     }
     return f1;
 }
Esempio n. 24
0
 public static int getIntPref(Context context, String s, int i)
 {
     if (!validate(context, s))
     {
         return i;
     }
     int j;
     try
     {
         j = context.getSharedPreferences("nfxpref", 0).getInt(s, i);
     }
     // Misplaced declaration of an exception variable
     catch (Context context)
     {
         Log.e("nfxpref", "Failed to get preferences!", context);
         return i;
     }
     return j;
 }
Esempio n. 25
0
 public static long getLongPref(Context context, String s, long l)
 {
     if (!validate(context, s))
     {
         return l;
     }
     long l1;
     try
     {
         l1 = context.getSharedPreferences("nfxpref", 0).getLong(s, l);
     }
     // Misplaced declaration of an exception variable
     catch (Context context)
     {
         Log.e("nfxpref", "Failed to get preferences!", context);
         return l;
     }
     return l1;
 }
    private UserLocale findBestMatch(String s)
    {
        Object obj = null;
        UserLocale auserlocale[] = toUserLocales(s);
        if (auserlocale.length < 1)
        {
            Log.w("nf_loc", "Empty list of preferred languages, set default");
            return null;
        }
        int i = 0;
        s = obj;
        do
        {
            if (i >= auserlocale.length)
            {
                break;
            }
            if (Log.isLoggable("nf_loc", 3))
            {
                Log.d("nf_loc", (new StringBuilder()).append("Choice #").append(i).append(": ").append(auserlocale[i]).toString());
            }
            for (int j = 0; j < supportedLocales.length;)
            {
                Object obj1;
label0:
                {
                    if (Log.isLoggable("nf_loc", 3))
                    {
                        Log.d("nf_loc", (new StringBuilder()).append("Try to match by locale with #").append(j).append(": ").append(supportedLocales[j]).toString());
                    }
                    obj1 = s;
                    if (auserlocale[i] == null)
                    {
                        break label0;
                    }
                    if (!auserlocale[i].equals(supportedLocales[j]))
                    {
                        obj1 = s;
                        if (!auserlocale[i].equalsByLanguage(supportedLocales[j]))
                        {
                            break label0;
                        }
                    }
                    if (Log.isLoggable("nf_loc", 3))
                    {
                        Log.d("nf_loc", (new StringBuilder()).append("Match by locale with #").append(j).append(": ").append(supportedLocales[j]).toString());
                    }
                    if (auserlocale[i].equals(supportedLocales[j]))
                    {
                        Log.d("nf_loc", (new StringBuilder()).append("Perfect Match by locale with #").append(j).append(": ").append(supportedLocales[j]).toString());
                        return supportedLocales[j];
                    }
                    obj1 = s;
                    if (s == null)
                    {
                        obj1 = supportedLocales[j];
                    }
                }
                j++;
                s = ((String) (obj1));
            }

            i++;
        } while (true);
        Log.i("nf_loc", (new StringBuilder()).append("findBestMatch: ").append(s).toString());
        return s;
    }