Add a warning that calling get() is unsafe when the system property
may not contain a valid UTF-encoded string.
(cherry picked from commit 6bf1cff1dd8cad0d2c6eb4f2cef28a97270e46b2)
Bug: 63177684
Test: m
Merged-In: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
Change-Id: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
Fixes:
frameworks/base/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java:149: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
public void testNoSettingsValueDefaultDisabledDoesNotStart() throws Exception {
^
(see http://errorprone.info/bugpattern/JUnit4TestNotRun)
Did you mean '@Test'?
frameworks/base/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java:170: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
public void testNoSettingsValueDefaultEnabledDoesStart() throws Exception {
^
(see http://errorprone.info/bugpattern/JUnit4TestNotRun)
Did you mean '@Test'?
Bug: 64489631
Test: m -j RUN_ERROR_PRONE=true javac-check
Merged-In: Ib32489d07778465134bca52c589baddbd78ab129
Change-Id: I41dfdf87529e532df385617fa05c7006a7a14c86
When the profile is updated in guest mode, the user icon in QS footer
is not displayed correctly. To fix this issue, the tinting of
guest icon is applied only when the drawable is not UserIconDrawable.
Fixes: 65148947
Test: manual - switch to guest and update the profile.
Change-Id: I9690e9fd286703a25ee08d877c3dd7f4729e2b31
Add methods that were missing from the previous API update because the
update-api version used for that had different behaviour from the
current one.
Specifically overrides for methods that differ only in sychronization
are now considered API-worthy and weren't before (b/62576297).
All methods added in this commit are methods that exist in the base
class without synchronization and are synchronized in the class they are
now being added in.
Bug: 64807220
Test: m checkapi
Change-Id: I9bf1b3d02e6a8f04b93ec36c0adffb7eedad3ad3
Merged-In: Iff584fb72dc8d651f9482b573f4b8cec89840ca6
This patch adds a layer of asynchonicity to the NetworkBaseObserver
callbacks implemented by Nat464Xlat in order to allow these callbacks
to run on the main ConnectivityService handler.
This allows to run interfaceLinkStateChanged and interfaceRemoved
callbacks in the same thread context as other Nat464Xlat methods and
solves the following issues:
- NPE risk due to race between fixupLinkProperties called on the
ConnectivityService thread and interfaceRemoved called as a
callback by NetworkManagementService.
- stale LinkProperties reads in both callbacks not called on
ConnectivityService handler.
- removes the race between stop() and interfaceRemoved().
This patch also:
- removes/simplifies comments related to the threading
model which are no obsolete.
- extract clatd management logic from ConnectivityService into
NetworkAgentInfo
Bug: 62997041
Bug: 64571917
Test: runtest frameworks-net
manually connected to ipv6 network and went to test-ipv6.com
Change-Id: I889d98e47423ff3d4746d6ed8015b265286e7c52
Change mimetype of PPT file to match MS specification.
(MimeUtils.java matched the MS specification)
Test: Check mimetype of DB after saving PPT file.
Change-Id: Ie559499ae39bc527fcc656ba37f28845af209e6c
Signed-off-by: bokyung.kim <bokyung.kim@lge.com>
Currently, scan throttling happens after client is registered, but
before the scan is started. This might lead to scan client being leaked.
This patch fixed that by moving check before client registration.
Bug: 64887233
Test: manual
Change-Id: I22ae624a0c51110cb69679f796926e3b2b36d0ac
When enabling the magnifier feature it is possible to trigger
a system crash.
Problem:
On ACTION_DOWN a MESSAGE_ON_ACTION_TAP_AND_HOLD is sent to the
handler with a delay based on long-press timeout. If the user
then removes their finger while outside of the magnification area,
(ACTION_UP) this message is not removed. Then when the message
is handled on long-press timeout, it puts the state into
STATE_VIEWPORT_DRAGGING. If the user then taps the screen again
it is handled by the StateViewportDraggingHandler resulting in:
IllegalArgumentException: Unexpected event type: ACTION_DOWN
and a system server crash.
Bug: 65101895
Test: Manual:
1. Enable "Magnify with button" from accessibility settings
2. Tap accessibility button on the right navbar
3. Touch & hold bottom part of application area
4. Quickly drag down to the navbar and release
5. Touch anywhere
With this patch it should not crash
Change-Id: I7df8d2185f6db9d148d24d2b155cb357b3637a71
This patch does some cleanup of Nat464Xlat internal state guards
against the Nat464Xlat state Idle | Started | Running, which reduces
code nesting.
It also replaces introspection of internal state for distinguishing
between different stages in 464xlat lifecycle with an enum explicitly
introducing these three Idle | Started | Running states.
Bug: 62997041
Bug: 64571917
Test: runtest frameworks-net
manually connected to ipv6 network and went to test-ipv6.com
Change-Id: I6efc9fed2420ca488731a2b9b9c3c025b16eca10
This patch does some minor refactoring of clat starting/stopping code:
- remove unused LinkProperties arguments in updateClat
- remove unused Context argument in Nat464Xlat ctor
- introduce ensureClatIsStarted and ensureClatIsStopped methods and
simplify updateClat
- add clatd to NetworkAgentInfo toString() method
- clarify some comments
This changes prepare for moving BaseNetworkObserver callbacks to
ConnectivityService.
Bug: 62997041
Bug: 64571917
Test: runtest frameworks-net
manually connected to IPv6 only network and went to test-ipv6.com
Change-Id: Idb204784614cfe700f73255a7a7b78c5e9ee6eca
Define connection event to notify
Telecom/InCallUi about change in
account handle after redial and extra
for emergency phone handle.
Bug: 27059146
Change-Id: Ie72ab2901ec05d972204ed11f115a05b79173c1d
It may get old value from mValues, so check the generation
is not changed before update cache
Bug: https://issuetracker.google.com/issues/64995655
Test: Build
Change-Id: Ia7ae18baa269d0590e36f186e2f14b0bfbab3504
Signed-off-by: xulicheng <xulicheng@xiaomi.com>
LOW_BATTERY is for disconnect mid-call due to low battery.
DIAL_LOW_BATTERY is for failure while dialing due to low battery.
Test: Manual.
Merged-In: Ife7a4ca5645b3fb42ab20effb4d8d4a8fef8116b
Change-Id: Ife7a4ca5645b3fb42ab20effb4d8d4a8fef8116b
Fixes: 63936576
* Manual style corrections with IDE assistance
* Variable name refactors are done through IDE
* Corrected general style errors such as:
- "final private var" -> "private final var"
- "&&", "+", "||" should not be at the end of line
- Non-static private variable should be like "mVar"
- Private static variable should be like "sVar"
- Code file should always end with newline
- Inherited methods should be annotated with @Override
and no @hide tags
- Public methods should always have a JavaDoc entry
- "int[] array" is preferred over "int array[]"
- private methods should be accessed without "this."
when there is no name collisions.
- "boolean ? true : false" -> boolean
- "boolean ? false : true" -> !boolean
- "boolean == true" OR "boolean != false" -> boolean
- "boolean != true" OR "boolean == false" -> !boolean
Bug: 63596319
Test: make checkbuild, no functional changes
Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
* Automatic style corrections through IDE
Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
The kernel version displayed in settings is only shown correctly
when built with gcc, this change adds support for a kernel built
with clang.
Test: manually on hikey with following command:
adb shell am instrument -w -e class com.android.settings.DeviceInfoSettingsTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Change-Id: I9b7991681cb5abdf44e7d1d1bff84c7c866be2ed
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Currently, if setting a data limit fails, we completely stop
offload in order to avoid data overages. However, the next thing
we do is try to fetch the stats and crash, because once offload
is stopped all our local state is cleared.
Fix this by fetching stats before we stop offload.
Bug: 29337859
Bug: 32163131
Bug: 64867836
Test: OffloadControllerTest passes
Test: no crash when disabling wifi tethering with BT tethering active
Merged-In: I7fc47e60b2da5f39c26fb22c1325618f9948dd38
Merged-In: I464dd2a6d1996b1cfb8bbf82b6ee453fd0747569
Change-Id: I260f5450f8b67f055983af68fb23a5f3cfc0bc69
(cherry picked from commit d743601a002ac12c02da58e92ebd0544ab0b77ea)
* Move some vendor intents and extras into a VendorIntents class
* Add a download result RESULT_IO_ERROR
* Add documentation noting that repeated calls to
setTempFileRootDirectory will not throw an error if the parameter is the
same.
* Add getTempFileRootDirectory method for app
* Hide AIDL classes from the public/system API surfaces for download
* Remove size and md5hash from FileInfo
Change-Id: I8c968a7d68db2588ee550167ed2693fe89c5925a
This patch removes the call to runWithScissors() in
OffloadController#getTetherStats() that was causing a deadlock when
NetworkStatsService would be polled for stats in certain threading
contexts.
Instead of trying to query the tethering offload HAL synchronously all
the time, this patch:
- changes getTetherStats() to only call into the offload HAL when it
detects that it is called on the same thread as the Tethering handler
thread.
- changes the map of interface to accumulated tethering forwarded stats
to be concurrent.
This makes stats reading from getTetherStats() eventually consistent.
From the point of view of getTetherStats(), it preserves the guarantees
that tethering stats are monotonically increasing, and also guarantees
no tearing between rx bytes and tx bytes.
Bug: 29337859
Bug: 32163131
Bug: 64771555
Test: runtest frameworks-net
Merged-In: Ibcd351ad0225ef146b00a807833f76d2a886f6c1
Merged-In: I61786d61fe1422e429c0dd9eadaff6f02eb850e7
Merged-In: I999d1d1bf72e7ab02c5d17f37aad00bc711d3fc5
(cherry pick from commit eb5e465edd78bea26289f779b635c7e94d934854)
Change-Id: I28646b962cee8c8a6efd66059f84873c02ac5810
1. Mock the service manager so that NMS can fetch mock versions
of INetd and IBatteryStats.
2. Call LocalServices.removeServiceForTest to avoid a duplicate
service registration error. // check this
3. Change the timeout from 100ms to 200ms, as otherwise the tests
that check for IfaceClass fail.
4. Convert NetworkManagementServiceTest to JUnit 4.
5. Move NetworkManagementServiceTest to tests/net
Bug: 29337859
Bug: 32163131
Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: Ic7371b427b35809ccd446addf35c9d8ae99ccfd3