/packages/apps/Settings/src/com/android/settings/datausage/ |
H A D | DataUsageInfoController.java | 27 public void updateDataLimit(DataUsageInfo info, NetworkPolicy policy) { argument 28 if (info == null || policy == null) { 31 if (policy.warningBytes >= 0) { 32 info.warningLevel = policy.warningBytes; 34 if (policy.limitBytes >= 0) { 35 info.limitLevel = policy.limitBytes;
|
H A D | DataUsageBase.java | 72 protected boolean isNetworkPolicyModifiable(NetworkPolicy policy, int subId) { argument 73 return policy != null && isBandwidthControlEnabled() && services.mUserManager.isAdminUser()
|
H A D | ChartDataUsagePreference.java | 128 private void bindNetworkPolicy(UsageView chart, NetworkPolicy policy, int top) { argument 132 if (policy == null) { 136 if (policy.limitBytes != NetworkPolicy.LIMIT_DISABLED) { 138 labels[2] = getLabel(policy.limitBytes, R.string.data_usage_sweep_limit, mLimitColor); 141 if (policy.warningBytes != NetworkPolicy.WARNING_DISABLED) { 142 chart.setDividerLoc((int) (policy.warningBytes / RESOLUTION)); 143 float weight = policy.warningBytes / RESOLUTION / (float) top; 147 labels[1] = getLabel(policy.warningBytes, R.string.data_usage_sweep_warning, 163 public void setNetworkPolicy(NetworkPolicy policy) { argument 164 mPolicy = policy; [all...] |
H A D | CycleAdapter.java | 68 public boolean updateCycleList(NetworkPolicy policy, ChartData chartData) { argument 89 if (policy != null) { 91 long cycleEnd = computeNextCycleBoundary(historyEnd, policy); 95 final long cycleStart = computeLastCycleBoundary(cycleEnd, policy); 114 // no policy defined cycles; show entry for each four-week period
|
/packages/apps/Email/tests/src/com/android/email/ |
H A D | MockVendorPolicy.java | 29 public static Bundle getPolicy(String policy, Bundle args) { argument 30 passedPolicy = policy;
|
H A D | SecurityPolicyTests.java | 112 Policy policy = new Policy(); 113 policy.mPasswordMinLength = minPasswordLength; 114 policy.mPasswordMode = passwordMode; 115 policy.mPasswordMaxFails = maxPasswordFails; 116 policy.mMaxScreenLockTime = maxScreenLockTime; 117 policy.mRequireRemoteWipe = requireRemoteWipe; 118 policy.mPasswordExpirationDays = passwordExpirationDays; 119 policy.mPasswordHistory = passwordHistory; 120 policy.mPasswordComplexChars = passwordComplexChars; 121 policy 479 policySetEqualsPolicy(PolicySet ps, Policy policy) argument [all...] |
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/utils/ |
H A D | edit_distance.h | 30 AK_FORCE_INLINE static float getEditDistance(const EditDistancePolicy *const policy) { argument 31 const int beforeLength = policy->getString0Length(); 32 const int afterLength = policy->getString1Length(); 35 dp[(afterLength + 1) * i] = i * policy->getInsertionCost(i - 1, -1); 38 dp[i] = i * policy->getDeletionCost(-1, i - 1); 44 dp[(afterLength + 1) * i + (j + 1)] + policy->getInsertionCost(i, j), 46 dp[(afterLength + 1) * (i + 1) + j] + policy->getDeletionCost(i, j), 47 dp[(afterLength + 1) * i + j] + policy->getSubstitutionCost(i, j))); 48 if (policy->allowTransposition(i, j)) { 52 + policy [all...] |
/packages/services/Car/tests/vehiclenetworkservice_unit_tests/ |
H A D | VehiclePropertyAccessControlForTesting.cpp | 37 bool VehiclePropertyAccessControlForTesting::process(const char* policy) { argument 38 return VehiclePropertyAccessControl::process(policy);
|
/packages/services/Car/service/src/com/android/car/ |
H A D | AudioRoutingPolicy.java | 28 * Holds audio routing policy from config.xml. R.array.audioRoutingPolicy can contain 73 private AudioRoutingPolicy(String policy) { argument 74 String[] streamPolicies = policy.split("#"); 99 Log.e(CarLog.TAG_AUDIO, "Audio routing policy did not include unknown"); 114 Log.w(CarLog.TAG_AUDIO, "Audio routing policy did not cover logical stream " +
|
/packages/services/Telephony/tests/src/com/android/phone/vvm/omtp/scheduling/ |
H A D | BaseTaskTest.java | 45 verify(task.policy).onBeforeExecute(); 46 verify(task.policy).onCompleted(); 54 verify(task.policy).onFail(); 61 verify(task1.policy, never()).onDuplicatedTaskAdded(); 65 verify(task1.policy).onDuplicatedTaskAdded(); 76 verify(task1.policy, never()).onDuplicatedTaskAdded(); 80 verify(task1.policy, never()).onDuplicatedTaskAdded(); 101 public Policy policy; field in class:BaseTaskTest.DummyBaseTask 106 policy = mock(Policy.class); 107 addPolicy(policy); 118 public Policy policy; field in class:BaseTaskTest.FailingBaseTask [all...] |
/packages/services/Car/car-lib/src/android/car/content/pm/ |
H A D | CarPackageManager.java | 39 * flag is set, the call will be blocked until policy is set to system. This can take time 47 * flag is set, passed policy is added to existing policy set from the current package. 49 * policy is replaced. Note that policy per each package is always replaced and will not be 57 * flag is set, passed policy is removed from existing policy set from the current package. 59 * policy is replaced. 87 * Set Application blocking policy for system app. {@link #FLAG_SET_POLICY_ADD} or 88 * {@link #FLAG_SET_POLICY_REMOVE} flag allows adding or removing from already set policy 107 setAppBlockingPolicy(String packageName, CarAppBlockingPolicy policy, @SetPolicyFlags int flags) argument [all...] |
/packages/apps/Email/emailcommon/src/com/android/emailcommon/service/ |
H A D | PolicyServiceProxy.java | 61 // This is not a great situation, but it's better to act like the policy isn't enforced 71 public void setAccountPolicy(final long accountId, final Policy policy, argument 73 setAccountPolicy2(accountId, policy, securityKey, true /* notify */); 77 public void setAccountPolicy2(final long accountId, final Policy policy, argument 82 mService.setAccountPolicy2(accountId, policy, securityKey, notify); 97 // This is not a great situation, but it's better to act like the policy isn't enforced 151 public static void setAccountPolicy(Context context, long accountId, Policy policy, argument 153 setAccountPolicy2(context, accountId, policy, securityKey, true /* notify */); 156 public static void setAccountPolicy2(Context context, long accountId, Policy policy, argument 159 new PolicyServiceProxy(context).setAccountPolicy2(accountId, policy, securityKe [all...] |
/packages/apps/Settings/src/com/android/settings/notification/ |
H A D | ZenModeSettings.java | 123 private boolean isCategoryEnabled(Policy policy, int categoryType) { argument 124 return (policy.priorityCategories & categoryType) != 0;
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/ |
H A D | ViewsStateBundle.java | 60 public ViewsStateBundle(int policy, int limit) { argument 61 savePolicy = policy; 122 * Save views regardless what's the current policy is. 135 * The visible view is saved when policy is not {@link #SAVE_NO_CHILD}. 156 * Save list of visible views without checking policy. The method is to be implemented by 162 * Save views according to policy.
|
/packages/services/Car/service/src/com/android/car/pm/ |
H A D | AppBlockingPolicyProxy.java | 46 * policy not set within this time after binding will be treated as failure and will be 60 Log.w(CarLog.TAG_PACKAGE, "Timeout for policy setting for service:" + mServiceInfo); 108 ICarAppBlockingPolicy policy = null; 112 policy = mPolicyService; 113 if (policy == null) { 154 public void setAppBlockingPolicy(CarAppBlockingPolicy policy) { argument 156 if (policy == null) { 157 Log.w(CarLog.TAG_PACKAGE, "setAppBlockingPolicy null policy from policy service:" + 160 mService.onPolicyConnectionAndSet(AppBlockingPolicyProxy.this, policy); [all...] |
H A D | CarPackageManagerService.java | 53 //TODO monitor app installing and refresh policy 66 * Hold policy set from policy service or client. 67 * Key: packageName of policy service 91 public void setAppBlockingPolicy(String packageName, CarAppBlockingPolicy policy, int flags) { argument 93 Log.i(CarLog.TAG_PACKAGE, "policy setting from binder call, client:" + packageName); 95 doSetAppBlockingPolicy(packageName, policy, flags, true /*setNow*/); 98 private void doSetAppBlockingPolicy(String packageName, CarAppBlockingPolicy policy, int flags, argument 106 if (policy == null) { 107 throw new IllegalArgumentException("policy canno 266 doUpdatePolicy(String packageName, CarAppBlockingPolicy policy, int flags) argument 433 onPolicyConnectionAndSet(AppBlockingPolicyProxy proxy, CarAppBlockingPolicy policy) argument 442 doHandlePolicyConnection(AppBlockingPolicyProxy proxy, CarAppBlockingPolicy policy) argument 537 requestUpdatingPolicy(String packageName, CarAppBlockingPolicy policy, int flags) argument [all...] |
/packages/apps/Email/provider_src/com/android/email/ |
H A D | SecurityPolicy.java | 76 * Get the security policy instance 103 * Compute the aggregate policy for all accounts that require it, and record it. 116 * @return a policy representing the strongest aggregate. If no policy sets are defined, 117 * a lightweight "nothing required" policy will be returned. Never null. 140 Policy policy = new Policy(); 143 policy.restore(c); 145 LogUtils.d(TAG, "Aggregate from: " + policy); 148 Math.max(policy.mPasswordMinLength, aggregate.mPasswordMinLength); 149 aggregate.mPasswordMode = Math.max(policy 249 isActive(Policy policy) argument 319 getInactiveReasons(Policy policy) argument 536 setAccountPolicy(Context context, Account account, Policy policy, String securitySyncKey) argument 597 setAccountPolicy(long accountId, Policy policy, String securityKey, boolean notify) argument [all...] |
/packages/services/Car/vehicle_network_service/ |
H A D | VehiclePropertyAccessControl.cpp | 260 bool VehiclePropertyAccessControl::process(const char* policy) { argument 264 doc = xmlReadFile(policy, NULL, 0); 266 ALOGE("Could not find %s\n", policy); 272 ALOGE("Not a valid config file %s\n", policy); 278 ALOGE("Not a valid config file %s\n", policy);
|
/packages/services/Telephony/src/com/android/phone/vvm/omtp/scheduling/ |
H A D | BaseTask.java | 94 public BaseTask addPolicy(Policy policy) { argument 96 mPolicies.add(policy); 149 for (Policy policy : mPolicies) { 150 policy.onCreate(this, intent, flags, startId); 162 for (Policy policy : mPolicies) { 163 policy.onBeforeExecute(); 172 for (Policy policy : mPolicies) { 173 policy.onFail(); 177 for (Policy policy : mPolicies) { 178 policy [all...] |
/packages/apps/Email/emailcommon/src/com/android/emailcommon/ |
H A D | VendorPolicyLoader.java | 30 * A bridge class to the email vendor policy apk. 32 * <p>Email vendor policy is a system apk named "com.android.email.helper". When exists, it must 33 * contain a class called "com.android.email.policy.EmailPolicy" with a static public method 36 * <p>A vendor policy apk is optional. The email application will operate properly when none is 40 private static final String POLICY_PACKAGE = "com.android.email.policy"; 79 LogUtils.d(Logging.LOG_TAG, String.format("Using policy: package=%s name=%s", 118 // Package not found -- it's okay - there's no policy .apk found, which is OK 140 * Calls the getPolicy method in the policy apk, if one exists. This method never returns null; 141 * It returns an empty {@link Bundle} when there is no policy apk (or even if the inner 145 public Bundle getPolicy(String policy, Bundl argument [all...] |
/packages/apps/Email/src/com/android/email/activity/setup/ |
H A D | SetupDataFragment.java | 40 private static final String SAVESTATE_POLICY = "SetupDataFragment.policy"; 162 public synchronized void setPolicy(Policy policy) { argument 163 mPolicy = policy; 278 sb.append(":policy=");
|
H A D | AccountSettingsFragment.java | 103 @SuppressWarnings("unused") // temporarily unused pending policy UI 105 @SuppressWarnings("unused") // temporarily unused pending policy UI 591 @SuppressWarnings("unused") // temporarily unused pending policy UI 592 private ArrayList<String> getSystemPoliciesList(Policy policy) { argument 595 if (policy.mPasswordMode != Policy.PASSWORD_MODE_NONE) { 598 if (policy.mPasswordHistory > 0) { 601 if (policy.mPasswordExpirationDays > 0) { 604 if (policy.mMaxScreenLockTime > 0) { 607 if (policy.mDontAllowCamera) { 610 if (policy [all...] |
/packages/apps/Settings/src/com/android/settings/widget/ |
H A D | ChartDataUsageView.java | 168 public void bindNetworkPolicy(NetworkPolicy policy) { argument 169 if (policy == null) { 177 if (policy.limitBytes != NetworkPolicy.LIMIT_DISABLED) { 180 mSweepLimit.setValue(policy.limitBytes); 187 if (policy.warningBytes != NetworkPolicy.WARNING_DISABLED) { 189 mSweepWarning.setValue(policy.warningBytes); 221 // always show known data and policy lines
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/ |
H A D | Policy.java | 47 CONTENT_URI = Uri.parse(EmailContent.CONTENT_URI + "/policy"); 52 /* Small offset (2 minutes) added to policy expiration to make user testing easier. */ 176 // We override this method to insure that we never write invalid policy data to the provider 188 * @param policy the new policy for this account 191 Policy policy) { 200 int policyMax = policy.mDontAllowAttachments ? 0 : (policy.mMaxAttachmentSize > 0) ? 201 policy.mMaxAttachmentSize : Integer.MAX_VALUE; 190 setAttachmentFlagsForNewPolicy(Context context, Account account, Policy policy) argument
|
/packages/services/Car/service/src/com/android/car/hal/ |
H A D | AudioHalService.java | 185 public void setAudioRoutingPolicy(AudioRoutingPolicy policy) { argument 195 for (int i = 0; i < policy.getPhysicalStreamsCount(); i++) { 199 for (int logicalStream : policy.getLogicalStreamsForPhysicalStream(i)) {
|