/frameworks/base/tests/CoreTests/android/core/ |
ProxyTest.java | 29 private Context mContext; 36 mContext = getContext(); 38 String proxyHost = Proxy.getHost(mContext); 39 int proxyPort = Proxy.getPort(mContext); 54 assertEquals(mHttpHost, Proxy.getPreferredHttpHost(mContext, null)); 55 assertEquals(mHttpHost, Proxy.getPreferredHttpHost(mContext, "")); 56 assertEquals(mHttpHost, Proxy.getPreferredHttpHost(mContext, "bad:")); 57 assertEquals(mHttpHost, Proxy.getPreferredHttpHost(mContext, "bad")); 58 assertEquals(mHttpHost, Proxy.getPreferredHttpHost(mContext, "bad:\\")); 59 assertEquals(mHttpHost, Proxy.getPreferredHttpHost(mContext, "bad://#")) [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
RotationLockController.java | 27 private final Context mContext; 44 mContext = context; 46 if (RotationPolicy.isRotationLockToggleSupported(mContext)) { 47 RotationPolicy.registerRotationPolicyListener(mContext, 57 if (RotationPolicy.isRotationLockToggleSupported(mContext)) { 58 return RotationPolicy.isRotationLocked(mContext); 64 if (RotationPolicy.isRotationLockToggleSupported(mContext)) { 65 RotationPolicy.setRotationLock(mContext, locked); 70 if (RotationPolicy.isRotationLockToggleSupported(mContext)) { 71 return RotationPolicy.isRotationLockToggleVisible(mContext); [all...] |
/external/chromium_org/chrome/android/javatests/src/org/chromium/chrome/browser/identity/ |
UuidBasedUniqueIdentificationGeneratorTest.java | 18 private AdvancedMockContext mContext; 23 mContext = new AdvancedMockContext(getInstrumentation().getTargetContext()); 31 TestGenerator generator = new TestGenerator(mContext, preferenceKey, expectedUniqueId); 37 mContext.clearFlag(FLAG_UUID); 39 assertFalse(mContext.isFlagSet(FLAG_UUID)); 43 mContext.clearFlag(FLAG_UUID); 44 generator = new TestGenerator(mContext, preferenceKey, null); 46 assertFalse(mContext.isFlagSet(FLAG_UUID)); 56 TestGenerator generator1 = new TestGenerator(mContext, preferenceKey1, expectedUniqueId1); 57 TestGenerator generator2 = new TestGenerator(mContext, preferenceKey2, expectedUniqueId2) [all...] |
/cts/tests/tests/widget/src/android/widget/cts/ |
RadioButtonTest.java | 31 private Context mContext; 36 mContext = getInstrumentation().getTargetContext(); 40 AttributeSet attrs = mContext.getResources().getLayout(R.layout.radiogroup_1); 43 new RadioButton(mContext); 50 new RadioButton(mContext, attrs); 56 new RadioButton(mContext, null); 58 new RadioButton(mContext, attrs, 0); 64 new RadioButton(mContext, null, 0); 65 new RadioButton(mContext, attrs, Integer.MAX_VALUE); 66 new RadioButton(mContext, attrs, Integer.MIN_VALUE) [all...] |
ZoomControlsTest.java | 31 private Context mContext; 36 mContext = getInstrumentation().getContext(); 40 new ZoomControls(mContext); 42 new ZoomControls(mContext, null); 46 ZoomControls zoomControls = new ZoomControls(mContext); 63 ZoomControls zoomControls = new ZoomControls(mContext); 74 ZoomControls zoomControls = new ZoomControls(mContext); 86 final ZoomControls zoomControls = new ZoomControls(mContext); 97 ZoomControls zoomControls = new ZoomControls(mContext); 103 ZoomControls zoomControls = new ZoomControls(mContext); [all...] |
/frameworks/base/core/tests/coretests/src/android/view/ |
CreateViewTest.java | 41 new CreateViewTest.ViewOne(mContext); 46 LinearLayout vert = new LinearLayout(mContext); 47 vert.addView(new CreateViewTest.ViewOne(mContext), 53 LinearLayout vert = new LinearLayout(mContext); 55 ViewOne one = new ViewOne(mContext); 58 ViewOne two = new ViewOne(mContext); 61 ViewOne three = new ViewOne(mContext); 64 ViewOne four = new ViewOne(mContext); 67 ViewOne five = new ViewOne(mContext); 70 ViewOne six = new ViewOne(mContext); [all...] |
/cts/tests/tests/text/src/android/text/format/cts/ |
FormatterTest.java | 35 assertEquals("0.00B", Formatter.formatFileSize(mContext, 0)); 37 assertEquals("899B", Formatter.formatFileSize(mContext, 899)); 39 assertEquals("1.00KB", Formatter.formatFileSize(mContext, bd.pow(1).longValue())); 41 assertEquals("1.00MB", Formatter.formatFileSize(mContext, bd.pow(2).longValue())); 43 assertEquals("1.00GB", Formatter.formatFileSize(mContext, bd.pow(3).longValue())); 45 assertEquals("1.00TB", Formatter.formatFileSize(mContext, bd.pow(4).longValue())); 47 assertEquals("1.00PB", Formatter.formatFileSize(mContext, bd.pow(5).longValue())); 49 assertEquals("1024PB", Formatter.formatFileSize(mContext, bd.pow(6).longValue())); 52 assertEquals("-1.00B", Formatter.formatFileSize(mContext, -1));
|
/cts/tests/tests/app/src/android/app/cts/ |
PendingIntentTest.java | 35 private Context mContext; 47 mContext = getContext(); 102 mIntent.setClass(mContext, PendingIntentStubActivity.class); 104 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, 106 assertEquals(mContext.getPackageName(), mPendingIntent.getTargetPackage()); 116 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, 120 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, 142 mIntent.setClass(mContext, MockReceiver.class); 143 mPendingIntent = PendingIntent.getBroadcast(mContext, 1, mIntent, 153 mPendingIntent = PendingIntent.getBroadcast(mContext, 1, mIntent [all...] |
ServiceTest.java | 44 private Context mContext; 137 mContext.startService(new Intent(service).putExtras(bundle)); 140 mContext.startService(new Intent(service).putExtras(bundle)); 145 mContext.stopService(service); 149 mContext.stopService(service); 155 mContext.startService(service); 185 mContext.bindService(service, conn, 0); 186 mContext.startService(service); 190 mContext.bindService(service, conn2, 0); 193 mContext.unbindService(conn2) [all...] |
/cts/tests/tests/view/src/android/view/cts/ |
ViewGroupTest.java | 63 private Context mContext; 75 mContext = getInstrumentation().getTargetContext(); 79 new MockViewGroup(mContext); 80 new MockViewGroup(mContext, null); 81 new MockViewGroup(mContext, null, 0); 85 MockViewGroup vg = new MockViewGroup(mContext); 89 TextView textView = new TextView(mContext); 105 MockViewGroup vg = new MockViewGroup(mContext); 106 TextView textView = new TextView(mContext); 117 MockViewGroup vg = new MockViewGroup(mContext); [all...] |
OrientationListenerTest.java | 29 private Context mContext; 34 mContext = getContext(); 38 new MockOrientationListener(mContext); 40 new MockOrientationListener(mContext, SensorManager.SENSOR_DELAY_UI); 45 MockOrientationListener listener = new MockOrientationListener(mContext); 52 new MockOrientationListener(mContext).onAccuracyChanged(SensorManager.SENSOR_ACCELEROMETER, 55 new MockOrientationListener(mContext).onAccuracyChanged(SensorManager.SENSOR_ORIENTATION, 61 MockOrientationListener listener = new MockOrientationListener(mContext); 66 new MockOrientationListener(mContext).onSensorChanged(SensorManager.SENSOR_ACCELEROMETER, 73 new MockOrientationListener(mContext).onSensorChanged(SensorManager.SENSOR_MAGNETIC_FIELD [all...] |
/frameworks/base/core/java/com/android/internal/view/ |
ActionBarPolicy.java | 33 private Context mContext; 40 mContext = context; 44 return mContext.getResources().getInteger(R.integer.max_action_buttons); 52 return mContext.getResources().getDisplayMetrics().widthPixels / 2; 56 final int targetSdk = mContext.getApplicationInfo().targetSdkVersion; 58 return mContext.getResources().getBoolean(R.bool.action_bar_embed_tabs); 63 return mContext.getResources().getBoolean(R.bool.action_bar_embed_tabs_pre_jb); 67 TypedArray a = mContext.obtainStyledAttributes(null, R.styleable.ActionBar, 70 Resources r = mContext.getResources(); 83 return mContext.getApplicationInfo().targetSdkVersion [all...] |
/cts/tests/tests/content/src/android/content/cts/ |
Intent_ShortcutIconResourceTest.java | 31 Context mContext; 38 mContext = getContext(); 42 String resourceName = mContext.getResources().getResourceName( 44 mShortcutIconResource = ShortcutIconResource.fromContext(mContext, 52 String resourceName = mContext.getResources().getResourceName( 54 mShortcutIconResource = ShortcutIconResource.fromContext(mContext, 59 assertEquals(mContext.getPackageName(), 65 mShortcutIconResource = ShortcutIconResource.fromContext(mContext,
|
ContextTest.java | 37 private Context mContext; 42 mContext = getContext(); 43 mContext.setTheme(R.style.Test_Theme); 47 String testString = mContext.getString(R.string.context_test_string1); 50 testString = mContext.getString(R.string.context_test_string1, "expected"); 53 testString = mContext.getString(R.string.context_test_string2); 58 testString = mContext.getString(0, "expected"); 65 testString = mContext.getString(0); 72 CharSequence testCharSequence = mContext.getText(R.string.context_test_string2); 77 testCharSequence = mContext.getText(0) [all...] |
/libcore/crypto/src/main/java/org/conscrypt/ |
OpenSSLX509CRLEntry.java | 31 private final long mContext; 34 mContext = ctx; 40 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 49 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 59 return NativeCrypto.X509_REVOKED_get_ext_oid(mContext, oid); 65 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 74 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 85 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 88 final long extensionRef = NativeCrypto.X509_REVOKED_get_ext(mContext, oid); 99 return NativeCrypto.i2d_X509_REVOKED(mContext); [all...] |
OpenSSLX509Certificate.java | 53 private final long mContext; 56 mContext = ctx; 161 NativeCrypto.get_X509_ext_oids(mContext, NativeCrypto.EXTENSION_TYPE_CRITICAL); 169 && (NativeCrypto.get_X509_ext_oids(mContext, 179 return NativeCrypto.X509_get_ext_oid(mContext, oid); 185 NativeCrypto.get_X509_ext_oids(mContext, NativeCrypto.EXTENSION_TYPE_NON_CRITICAL); 193 && (NativeCrypto.get_X509_ext_oids(mContext, 203 return (NativeCrypto.get_X509_ex_flags(mContext) & NativeCrypto.EXFLAG_CRITICAL) != 0; 226 return (int) NativeCrypto.X509_get_version(mContext) + 1; 231 return new BigInteger(NativeCrypto.X509_get_serialNumber(mContext)); [all...] |
/packages/apps/Email/src/com/android/email/service/ |
AccountService.java | 39 private Context mContext; 45 NotificationController nc = NotificationController.getInstance(mContext); 51 NotificationController.getInstance(mContext).cancelLoginFailedNotification(accountId); 61 return ResourceHelper.getInstance(mContext).getAccountColor(accountId); 68 VendorPolicyLoader.getInstance(mContext).useAlternateExchangeStrings()); 79 EmailServiceUtils.startRemoteServices(mContext); 81 MailActivityEmail.updateLoggingFlags(mContext); 83 return Device.getDeviceId(mContext); 92 if (mContext == null) { 93 mContext = this [all...] |
/packages/apps/Email/tests/src/com/android/email/ |
ControllerProviderOpsTests.java | 43 private Context mContext; 53 mContext = getContext(); 68 Mailbox.getSystemMailboxName(mContext, -1); 69 fail("Mailbox.getSystemMailboxName(mContext, -1) succeeded without an exception"); 74 assertEquals("Inbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_INBOX)); 75 assertEquals("Outbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_OUTBOX)); 76 assertEquals("Trash", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_TRASH)); 77 assertEquals("Sent", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_SENT)); 78 assertEquals("Junk", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_JUNK)); 83 assertEquals("Inbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_INBOX)) [all...] |
/frameworks/ex/variablespeed/src/com/android/ex/variablespeed/ |
MediaPlayerDataSource.java | 37 private final Context mContext; 42 mContext = context; 48 mContext = null; 54 if (mContext != null) { 55 mediaPlayer.setDataSource(mContext, mUri); 62 if (mContext != null) { 63 VariableSpeedNative.playFromContext(mContext, mUri);
|
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/ |
HapticFeedbackController.java | 23 private final Context mContext; 31 mContext = context; 35 mIsGloballyEnabled = checkGlobalSetting(mContext); 44 mVibrator = (Vibrator) mContext.getSystemService(Service.VIBRATOR_SERVICE); 47 mIsGloballyEnabled = checkGlobalSetting(mContext); 49 mContext.getContentResolver().registerContentObserver(uri, false, mContentObserver); 57 mContext.getContentResolver().unregisterContentObserver(mContentObserver);
|
/frameworks/support/tests/java/android/support/v4/content/ |
FileProviderTest.java | 60 strat.addRoot("tag", mContext.getFilesDir()); 62 File file = buildPath(mContext.getFilesDir(), "file.test"); 66 file = buildPath(mContext.getFilesDir(), "subdir", "file.test"); 80 strat.addRoot("tag", mContext.getFilesDir()); 82 File file = buildPath(mContext.getFilesDir(), "..", "file.test"); 92 strat.addRoot("tag1", mContext.getFilesDir()); 95 File file = buildPath(mContext.getFilesDir(), "file.test"); 101 strat.addRoot("tag2", mContext.getFilesDir()); 103 file = buildPath(mContext.getFilesDir(), "file.test"); 110 strat.addRoot("tag", mContext.getFilesDir()) [all...] |
/cts/tests/ProcessTest/src/com/android/cts/process/ |
ProcessTest.java | 38 String testApp = mContext.getPackageName(); 39 int uid1 = mContext.getPackageManager().getApplicationInfo(enableApp, 41 int uid2 = mContext.getPackageManager().getApplicationInfo(disableApp, 43 int uid3 = mContext.getPackageManager().getApplicationInfo(testApp, 50 ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); 51 String shareProcessName = mContext.getPackageName() + ":shareProcess"; 52 String noShareProcessName = mContext.getPackageName() + ":noShareProcess"; 57 sharePidIntent.setClass(mContext, SharePidActivity.class); 59 mContext.startActivity(sharePidIntent); 65 sharePidStubIntent.setClass(mContext, SharePidSubActivity.class) [all...] |
/frameworks/base/media/mca/filterfw/java/android/filterfw/ |
MffEnvironment.java | 34 private FilterContext mContext; 50 mContext = new FilterContext(); 51 mContext.setFrameManager(frameManager); 59 return mContext; 67 mContext.initGLEnvironment(glEnvironment); 85 GLEnvironment glEnv = mContext.getGLEnvironment(); 87 mContext.getGLEnvironment().activate(); 99 GLEnvironment glEnv = mContext.getGLEnvironment(); 101 mContext.getGLEnvironment().deactivate();
|
/frameworks/support/v7/appcompat/src/android/support/v7/internal/view/ |
ActionBarPolicy.java | 33 private Context mContext; 40 mContext = context; 44 return mContext.getResources().getInteger(R.integer.abc_max_action_buttons); 53 return mContext.getResources().getDisplayMetrics().widthPixels / 2; 59 return mContext.getResources().getBoolean(R.bool.abc_action_bar_embed_tabs_pre_jb); 63 TypedArray a = mContext.obtainStyledAttributes(null, R.styleable.ActionBar, 66 Resources r = mContext.getResources(); 79 return mContext.getApplicationInfo().targetSdkVersion < 14; // ICE_CREAM_SANDWICH 83 return mContext.getResources().getDimensionPixelSize(
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
RealSystemFacade.java | 29 private Context mContext; 32 mContext = context; 43 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 58 final ConnectivityManager conn = ConnectivityManager.from(mContext); 65 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 82 return DownloadManager.getMaxBytesOverMobile(mContext); 87 return DownloadManager.getRecommendedMaxBytesOverMobile(mContext); 92 mContext.sendBroadcast(intent); 97 return mContext.getPackageManager().getApplicationInfo(packageName, 0).uid == uid;
|