Guest User

Untitled

a guest
Mar 4th, 2012
1,546
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.google.android.apps.wallet.security;
  2.  
  3. import android.content.Context;
  4. import android.os.Build;
  5. import com.google.android.apps.wallet.WalletApplication;
  6. import com.google.android.apps.wallet.data.ClientConfiguration;
  7. import com.google.android.apps.wallet.datamanager.local.ClientConfigurationManager;
  8. import com.google.android.apps.wallet.inject.WalletInjector;
  9. import java.io.File;
  10. import java.io.IOException;
  11.  
  12. public class RootedPhoneDetectorImpl
  13. implements RootedPhoneDetector
  14. {
  15. private final ClientConfigurationManager mClientConfigurationManager;
  16.  
  17. private RootedPhoneDetectorImpl(ClientConfigurationManager paramClientConfigurationManager)
  18. {
  19. this.mClientConfigurationManager = paramClientConfigurationManager;
  20. }
  21.  
  22. private boolean canExecuteSuCommand()
  23. {
  24. try
  25. {
  26. Runtime.getRuntime().exec("su");
  27. i = 1;
  28. return i;
  29. }
  30. catch (IOException localIOException)
  31. {
  32. while (true)
  33. int i = 0;
  34. }
  35. }
  36.  
  37. private boolean hasSuperuserApk()
  38. {
  39. return new File("/system/app/Superuser.apk").exists();
  40. }
  41.  
  42. public static RootedPhoneDetector injectInstance(Context paramContext)
  43. {
  44. return new RootedPhoneDetectorImpl(WalletApplication.getWalletInjector().getClientConfigurationManager(paramContext));
  45. }
  46.  
  47. private boolean isTestKeyBuild()
  48. {
  49. String str = Build.TAGS;
  50. if ((str != null) && (str.contains("test-keys")));
  51. for (int i = 1; ; i = 0)
  52. return i;
  53. }
  54.  
  55. public boolean isRootedPhone()
  56. {
  57. int i = 0;
  58. if (!this.mClientConfigurationManager.getClientConfiguration().isRootedPhoneDetectionEnabled());
  59. while (true)
  60. {
  61. return i;
  62. if ((!isTestKeyBuild()) && (!hasSuperuserApk()) && (!canExecuteSuCommand()))
  63. continue;
  64. i = 1;
  65. }
  66. }
  67. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×