Home
last modified time | relevance | path

Searched refs:sContext (Results 1 – 13 of 13) sorted by relevance

/frameworks/base/telephony/java/android/telephony/
DAnomalyReporter.java54 private static Context sContext = null; field in AnomalyReporter
80 if (sContext == null) { in reportAnomaly()
102 sContext.sendBroadcast(dbgIntent, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE); in reportAnomaly()
124 sContext = context; in initialize()
128 PackageManager pm = sContext.getPackageManager(); in initialize()
160 if (sContext == null) return; in dump()
162 sContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, "Requires DUMP"); in dump()
163 pw.println("Initialized=" + (sContext != null ? "Yes" : "No")); in dump()
/frameworks/base/services/core/java/com/android/server/audio/
DRotationHelper.java48 private static Context sContext; field in RotationHelper
60 sContext = context; in init()
67 ((DisplayManager) sContext.getSystemService(Context.DISPLAY_SERVICE)) in enable()
73 ((DisplayManager) sContext.getSystemService(Context.DISPLAY_SERVICE)) in disable()
83 int newRotation = ((WindowManager) sContext.getSystemService( in updateOrientation()
/frameworks/base/core/tests/coretests/src/android/os/
DBinderWorkSourceTest.java46 private static Context sContext; field in BinderWorkSourceTest
76 sContext = InstrumentationRegistry.getContext(); in setUpOnce()
81 sContext.bindService( in setUp()
82 new Intent(sContext, BinderWorkSourceService.class), in setUp()
84 sContext.bindService( in setUp()
85 new Intent(sContext, BinderWorkSourceNestedService.class), in setUp()
99 sContext.unbindService(mConnection); in tearDown()
100 sContext.unbindService(mNestedConnection); in tearDown()
DBinderProxyCountingTest.java91 private static Context sContext; field in BinderProxyCountingTest
115 sContext = InstrumentationRegistry.getContext(); in setUpOnce()
116 sTestPkgUid = sContext.getPackageManager().getPackageUid(TEST_APP_PKG, 0); in setUpOnce()
117 ((ActivityManager) sContext.getSystemService(Context.ACTIVITY_SERVICE)).killUid(sTestPkgUid, in setUpOnce()
139 sContext.bindService(intent, connection, in bindService()
152 sContext.unbindService(service); in unbindService()
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DOomAdjusterTests.java46 private static Context sContext; field in OomAdjusterTests
57 sContext = getInstrumentation().getTargetContext(); in setUpOnce()
63 sService.mActivityTaskManager = new ActivityTaskManagerService(sContext); in setUpOnce()
64 sService.mActivityTaskManager.initialize(null, null, sContext.getMainLooper()); in setUpOnce()
67 sService.mConstants = new ActivityManagerConstants(sContext, sService, in setUpOnce()
68 sContext.getMainThreadHandler()); in setUpOnce()
81 mProcessRecord = spy(new ProcessRecord(sService, sContext.getApplicationInfo(), in setUpProcess()
DProcessRecordTests.java50 private static Context sContext; field in ProcessRecordTests
57 sContext = getInstrumentation().getTargetContext(); in setUpOnce()
63 sService.mActivityTaskManager = new ActivityTaskManagerService(sContext); in setUpOnce()
64 sService.mActivityTaskManager.initialize(null, null, sContext.getMainLooper()); in setUpOnce()
73 mProcessRecord = spy(new ProcessRecord(sService, sContext.getApplicationInfo(), in setUpProcess()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DPhoneFactory.java89 static private Context sContext; field in PhoneFactory
114 sContext = context; in makeDefaultPhone()
237 boolean isDynamicBinding = sContext.getResources().getBoolean( in makeDefaultPhone()
240 String defaultImsPackage = sContext.getResources().getString( in makeDefaultPhone()
244 sImsResolver = new ImsResolver(sContext, defaultImsPackage, numPhones, in makeDefaultPhone()
262 sSubscriptionMonitor = new SubscriptionMonitor(tr, sContext, sc, numPhones); in makeDefaultPhone()
264 sPhoneConfigurationManager = PhoneConfigurationManager.init(sContext); in makeDefaultPhone()
266 sCellularNetworkValidator = CellularNetworkValidator.make(sContext); in makeDefaultPhone()
272 sContext, sc, Looper.myLooper(), tr, sCommandsInterfaces, in makeDefaultPhone()
388 return SipPhoneFactory.makePhone(sipUri, sContext, sPhoneNotifier); in makeSipPhone()
[all …]
/frameworks/base/core/java/android/util/
DNtpTrustedTime.java42 private static Context sContext; field in NtpTrustedTime
78 sContext = context; in getInstance()
90 mCM = sContext.getSystemService(ConnectivityManager.class); in forceRefresh()
107 mCM = sContext.getSystemService(ConnectivityManager.class); in forceRefresh()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBstatsCpuTimesValidationTest.java112 private static Context sContext; field in BstatsCpuTimesValidationTest
122 sContext = InstrumentationRegistry.getContext(); in setupOnce()
124 sContext.getPackageManager().setApplicationEnabledSetting(TEST_PKG, in setupOnce()
126 sTestPkgUid = sContext.getPackageManager().getPackageUid(TEST_PKG, 0); in setupOnce()
136 Settings.Global.putString(sContext.getContentResolver(), in tearDownOnce()
143 sOriginalBatteryStatsConsts = Settings.Global.getString(sContext.getContentResolver(), in setDesiredReadyDelay()
160 Settings.Global.putString(sContext.getContentResolver(), in setDesiredReadyDelay()
516 final String bstatsConstants = Settings.Global.getString(sContext.getContentResolver(), in testCpuFreqTimes_trackingDisabled()
572 Settings.Global.putString(sContext.getContentResolver(), in testCpuFreqTimes_trackingDisabled()
597 Settings.Global.putString(sContext.getContentResolver(), in updateTrackPerProcStateCpuTimesSetting()
[all …]
/frameworks/base/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/
DDynamicCodeLoggerIntegrationTests.java89 private static Context sContext; field in DynamicCodeLoggerIntegrationTests
94 sContext = InstrumentationRegistry.getTargetContext(); in setUpAll()
120 ClassLoader parentClassLoader = sContext.getClass().getClassLoader(); in testGeneratesEvents_standardClassLoader()
141 ClassLoader knownClassLoader = sContext.getClass().getClassLoader(); in testGeneratesEvents_unknownClassLoader()
305 File ourPath = sContext.getDatabasePath("android_pay"); in testGeneratesEvents_spoofed_otherAppFile()
367 return new File(sContext.getDir("dcl", Context.MODE_PRIVATE), name); in privateFile()
/frameworks/base/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/
DUsageStatsDatabasePerfTest.java48 protected static Context sContext; field in UsageStatsDatabasePerfTest
79 sContext = InstrumentationRegistry.getTargetContext(); in setUpOnce()
80 mTestDir = new File(sContext.getFilesDir(), "UsageStatsDatabasePerfTest"); in setUpOnce()
/frameworks/base/tests/UsageReportingTest/src/com/android/tests/usagereporter/
DUsageReporterActivity.java52 private static Context sContext; field in UsageReporterActivity
59 sContext = getApplicationContext(); in onCreate()
244 Toast.makeText(sContext, e.toString(), Toast.LENGTH_LONG).show();
262 Toast.makeText(sContext, e.toString(), Toast.LENGTH_LONG).show();
/frameworks/base/core/java/android/provider/
DFontsContract.java163 private volatile static Context sContext; // set once in setApplicationContextForResources field in FontsContract
172 sContext = context.getApplicationContext(); in setApplicationContextForResources()
354 FontFamilyResult result = fetchFonts(sContext, null, request); in getFontSync()
356 Typeface typeface = buildTypeface(sContext, null, result.getFonts()); in getFontSync()