/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
Config.java | 77 private final Context mContext; 86 mContext = context; 90 return mContext; 103 String[] items = mContext.getResources().getStringArray(res); 122 return mContext.getResources().getInteger(R.integer.num_suggestions_above_keyboard); 129 return mContext.getResources().getInteger(R.integer.max_promoted_suggestions); 133 return mContext.getResources().getInteger(R.integer.max_promoted_results); 147 return mContext.getResources().getInteger(R.integer.max_shortcuts_per_web_source); 154 return mContext.getResources().getInteger(R.integer.max_shortcuts_per_non_web_source); 268 return mContext.getResources().getBoolean(R.bool.show_zero_query_suggestions) [all...] |
/frameworks/base/cmds/statsd/src/logd/ |
LogEvent.cpp | 32 mContext = 36 init(mContext); 37 if (mContext) { 38 // android_log_destroy will set mContext to NULL 39 android_log_destroy(&mContext); 47 mContext = create_android_logger(1937006964); // the event tag shared by all stats logs 48 if (mContext) { 49 android_log_write_int64(mContext, elapsedTimestampNs); 50 android_log_write_int32(mContext, tagId); 58 mContext = create_android_logger(1937006964); // the event tag shared by all stats log [all...] |
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/ |
ThumbsBarTest.java | 39 private Context mContext; 47 mContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 51 mBar = Mockito.spy(new ThumbsBar(mContext, null)); 54 assertEquals(mBar.mThumbHeightInPixel, mContext.getResources().getDimensionPixelSize( 56 assertEquals(mBar.mThumbWidthInPixel, mContext.getResources().getDimensionPixelSize( 58 assertEquals(mBar.mHeroThumbHeightInPixel, mContext.getResources().getDimensionPixelSize( 60 assertEquals(mBar.mHeroThumbWidthInPixel, mContext.getResources().getDimensionPixelSize( 69 mContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 73 mBar = Mockito.spy(new ThumbsBar(mContext, null)); 88 mContext = InstrumentationRegistry.getInstrumentation().getTargetContext() [all...] |
/cts/tests/tests/telecom/src/android/telecom/cts/ |
DefaultDialerOperationsTest.java | 36 private Context mContext; 45 mContext = getInstrumentation().getContext(); 47 if (!TestUtils.shouldTestTelecom(mContext)) { 57 mTelecomManager = (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); 75 if (!TestUtils.shouldTestTelecom(mContext)) { 84 if (!TestUtils.shouldTestTelecom(mContext)) { 88 mContext.getContentResolver().query(Voicemails.CONTENT_URI, null, null, null, null); 94 mContext.getContentResolver().delete(Voicemails.CONTENT_URI, 101 mContext.getContentResolver().update( 112 mContext.getContentResolver().query(Voicemails.CONTENT_URI, null, null, null, null) [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/ |
LauncherAppState.java | 48 private final Context mContext; 80 return mContext; 90 mContext = context; 92 mInvariantDeviceProfile = new InvariantDeviceProfile(mContext); 93 mIconCache = new IconCache(mContext, mInvariantDeviceProfile); 94 mWidgetCache = new WidgetPreviewLoader(mContext, mIconCache); 95 mModel = new LauncherModel(this, mIconCache, AppFilter.newInstance(mContext)); 97 LauncherAppsCompat.getInstance(mContext).addOnAppsChangedCallback(mModel); 113 mContext.registerReceiver(mModel, filter); 114 UserManagerCompat.getInstance(mContext).enableAndResetCache() [all...] |
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
FileCopyHelper.java | 38 private Context mContext; 49 mContext = context; 63 InputStream source = mContext.getResources().openRawResource(resId); 64 OutputStream target = mContext.openFileOutput(fileName, Context.MODE_WORLD_READABLE); 67 return mContext.getFileStreamPath(fileName).getAbsolutePath(); 71 InputStream source = mContext.getResources().openRawResource(resId); 97 mContext.deleteFile(path);
|
/cts/tests/tests/view/src/android/view/cts/ |
OrientationEventListenerTest.java | 39 private Context mContext; 43 mContext = InstrumentationRegistry.getTargetContext(); 48 new MyOrientationEventListener(mContext); 50 new MyOrientationEventListener(mContext, SensorManager.SENSOR_DELAY_UI); 55 MyOrientationEventListener listener = new MyOrientationEventListener(mContext); 62 SensorManager sm = (SensorManager)mContext.getSystemService(Context.SENSOR_SERVICE); 66 MyOrientationEventListener listener = new MyOrientationEventListener(mContext);
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
DeviceInfoUtilsTest.java | 32 private Context mContext; 36 mContext = RuntimeEnvironment.application; 50 assertThat(DeviceInfoUtils.formatKernelVersion(mContext, uname)).isEqualTo(expected); 62 final String expected = mContext.getString(R.string.status_unavailable); 64 assertThat(DeviceInfoUtils.formatKernelVersion(mContext, uname)).isEqualTo(expected); 69 final String expected = mContext.getString(R.string.status_unavailable); 71 assertThat(DeviceInfoUtils.formatKernelVersion(mContext, null)).isEqualTo(expected);
|
TetherUtilTest.java | 34 private Context mContext; 43 when(mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE)).thenReturn(null); 45 assertThat(TetherUtil.isEntitlementCheckRequired(mContext)).isTrue();
|
/frameworks/base/services/core/java/com/android/server/oemlock/ |
PersistentDataBlockLock.java | 36 private Context mContext; 39 mContext = context; 50 UserManager.get(mContext).setUserRestriction( 60 return !UserManager.get(mContext) 69 mContext.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE); 76 mContext.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE); 87 mContext.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
|
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/ |
HapticFeedbackController.java | 26 private final Context mContext; 34 mContext = context; 38 mIsGloballyEnabled = checkGlobalSetting(mContext); 47 mVibrator = (Vibrator) mContext.getSystemService(Service.VIBRATOR_SERVICE); 50 mIsGloballyEnabled = checkGlobalSetting(mContext); 52 mContext.getContentResolver().registerContentObserver(uri, false, mContentObserver); 60 mContext.getContentResolver().unregisterContentObserver(mContentObserver);
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ |
ProfileObserver.java | 17 private Context mContext; 23 mContext = context; 29 mContext.getContentResolver() 36 mContext.unregisterReceiver(mStateObserver); 37 Config.init(mContext); 42 mContext.getContentResolver().unregisterContentObserver(this); 48 mContext.registerReceiver(mStateObserver,
|
/packages/apps/Contacts/src/com/android/contacts/preference/ |
DisplayOrderPreference.java | 32 private Context mContext; 45 mContext = getContext(); 46 mPreferences = new ContactsPreferences(mContext); 48 mContext.getString(R.string.display_options_view_given_name_first), 49 mContext.getString(R.string.display_options_view_family_name_first), 67 return mContext.getString(R.string.display_options_view_given_name_first); 69 return mContext.getString(R.string.display_options_view_family_name_first);
|
PhoneticNameDisplayPreference.java | 34 private Context mContext; 48 mContext = getContext(); 49 mPreferences = new ContactsPreferences(mContext); 51 mContext.getString(R.string.editor_options_always_show_phonetic_names), 52 mContext.getString(R.string.editor_options_hide_phonetic_names_if_empty) 70 return mContext.getString(R.string.editor_options_always_show_phonetic_names); 72 return mContext.getString(R.string.editor_options_hide_phonetic_names_if_empty);
|
SortOrderPreference.java | 32 private Context mContext; 45 mContext = getContext(); 46 mPreferences = new ContactsPreferences(mContext); 48 mContext.getString(R.string.display_options_sort_by_given_name), 49 mContext.getString(R.string.display_options_sort_by_family_name), 67 return mContext.getString(R.string.display_options_sort_by_given_name); 69 return mContext.getString(R.string.display_options_sort_by_family_name);
|
/packages/apps/DeskClock/src/com/android/deskclock/controller/ |
ShortcutController.java | 52 private final Context mContext; 58 mContext = context; 59 mComponentName = new ComponentName(mContext, DeskClock.class); 60 mShortcutManager = mContext.getSystemService(ShortcutManager.class); 61 mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); 62 Controller.getController().addEventTracker(new ShortcutEventTracker(mContext)); 85 .setClass(mContext, HandleApiCalls.class) 90 return new ShortcutInfo.Builder(mContext, setAlarmShortcut) 91 .setIcon(Icon.createWithResource(mContext, R.drawable.shortcut_new_alarm)) 93 .setShortLabel(mContext.getString(R.string.shortcut_new_alarm_short) [all...] |
/packages/apps/Dialer/java/com/android/contacts/common/preference/ |
DisplayOrderPreference.java | 29 private Context mContext; 42 mContext = getContext(); 43 mPreferences = new ContactsPreferences(mContext); 46 mContext.getString(R.string.display_options_view_given_name_first), 47 mContext.getString(R.string.display_options_view_family_name_first), 66 return mContext.getString(R.string.display_options_view_given_name_first); 68 return mContext.getString(R.string.display_options_view_family_name_first);
|
SortOrderPreference.java | 29 private Context mContext; 42 mContext = getContext(); 43 mPreferences = new ContactsPreferences(mContext); 46 mContext.getString(R.string.display_options_sort_by_given_name), 47 mContext.getString(R.string.display_options_sort_by_family_name), 66 return mContext.getString(R.string.display_options_sort_by_given_name); 68 return mContext.getString(R.string.display_options_sort_by_family_name);
|
/developers/samples/android/tv/ChannelsPrograms/Application/src/main/java/com/example/android/tv/channelsprograms/ |
SyncChannelJobService.java | 65 private final Context mContext; 68 this.mContext = context; 73 List<Subscription> subscriptions = MockDatabase.getSubscriptions(mContext); 74 int numOfChannelsInTVProvider = TvUtil.getNumberOfChannels(mContext); 82 subscriptions = MockMovieService.createUniversalSubscriptions(mContext); 84 long channelId = TvUtil.createChannel(mContext, subscription); 86 TvContractCompat.requestChannelBrowsable(mContext, channelId); 89 MockDatabase.saveSubscriptions(mContext, subscriptions); 95 TvUtil.scheduleSyncingProgramsForChannel(mContext, channel.getChannelId());
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
WakeupNotificationFactory.java | 44 private final Context mContext; 48 mContext = context; 56 CharSequence title = mContext.getText(R.string.wifi_wakeup_onboarding_title); 57 CharSequence content = mContext.getText(R.string.wifi_wakeup_onboarding_subtext); 58 CharSequence disableText = mContext.getText(R.string.wifi_wakeup_onboarding_action_disable); 59 int color = mContext.getResources() 60 .getColor(R.color.system_notification_accent_color, mContext.getTheme()); 66 return mFrameworkFacade.makeNotificationBuilder(mContext, 85 mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/ |
ScreenPinningPreferenceControllerTest.java | 40 private Context mContext; 47 mContext = RuntimeEnvironment.application; 48 mController = new ScreenPinningPreferenceController(mContext); 49 mPreference = new Preference(mContext); 55 final ContentResolver contentResolver = mContext.getContentResolver(); 72 final ContentResolver contentResolver = mContext.getContentResolver(); 78 .isEqualTo(mContext.getString(R.string.switch_off_text)); 83 final ContentResolver contentResolver = mContext.getContentResolver(); 89 .isEqualTo(mContext.getString(R.string.switch_on_text));
|
SecuritySettingsTest.java | 42 private Context mContext; 52 when(mContext.getSystemService(Context.FINGERPRINT_SERVICE)) 55 mSummaryProvider = new SecuritySettings.SummaryProvider(mContext, mSummaryLoader); 67 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) 73 verify(mContext).getString(R.string.security_dashboard_summary); 78 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) 83 verify(mContext).getString(R.string.security_dashboard_summary_no_fingerprint); 88 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) 94 verify(mContext).getString(R.string.security_dashboard_summary_no_fingerprint);
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/p2p/testcase/ |
TestCase.java | 49 protected Context mContext; 69 mContext = context; 89 mListener.onTestFailed(mContext.getString(R.string.p2p_setup_error)); 102 mContext.getString(R.string.p2p_unexpected_error)); 145 mP2pMgr = (WifiP2pManager) mContext.getSystemService(Context.WIFI_P2P_SERVICE); 146 mWifiMgr = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); 147 mChannel = mP2pMgr.initialize(mContext, mContext.getMainLooper(), null); 148 mSubChannel = mP2pMgr.initialize(mContext, mContext.getMainLooper(), null) [all...] |
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
ManagementTest.java | 35 mContext.getSystemService(Context.DEVICE_POLICY_SERVICE); 61 UserHandle otherProfile = Utils.getOtherProfile(mContext); 65 AdminReceiver.getComponentName(mContext)); 85 UserHandle profileUserHandle = Utils.getOtherProfile(mContext); 87 assertTrue(mDevicePolicyManager.removeUser(AdminReceiver.getComponentName(mContext), 92 ComponentName admin = AdminReceiver.getComponentName(mContext); 99 AdminReceiver.getComponentName(mContext))); 103 UserHandle profileUserHandle = Utils.getOtherProfile(mContext); 106 mDevicePolicyManager.startUserInBackground(AdminReceiver.getComponentName(mContext), 111 UserHandle profileUserHandle = Utils.getOtherProfile(mContext); [all...] |
/cts/tests/tests/telecom2/src/android/telecom/cts/ |
DefaultDialerOperationsNoPermissionsTest.java | 28 private Context mContext; 36 mContext = getInstrumentation().getContext(); 37 if (!TestUtils.shouldTestTelecom(mContext)) { 40 TestUtils.PACKAGE = mContext.getPackageName(); 48 mTelecomManager = (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); 62 if (!TestUtils.shouldTestTelecom(mContext)) { 74 if (!TestUtils.shouldTestTelecom(mContext)) { 86 if (!TestUtils.shouldTestTelecom(mContext)) { 98 if (!TestUtils.shouldTestTelecom(mContext)) { 110 if (!TestUtils.shouldTestTelecom(mContext)) { [all...] |