Commit Graph

35862 Commits

Author SHA1 Message Date
daqi
be47df7395 Fix TrustedCredentialsSettings NPE
[Cause of Defect]
TrustedCredentialsSettings#mKeyChainConnectionByProfileId is get/set by
more than one thread. Main thread would set it in onDestroy method, and
AsyncTask would get and set in the doInBackground method. So
mKeyChainConnectionByProfileId.get(profileId) would get null after
onDestroy method get called.

Bug: N/A
Test: Debugger to simulate concurrency
Change-Id: I0664d1e9b88b079855354ce0e6fe014a98a22327
Signed-off-by: daqi <daqi@xiaomi.com>
2017-09-07 17:21:25 +08:00
Treehugger Robot
0bed3cacd7 Merge "Fix errorprone build" 2017-08-31 22:16:52 +00:00
Maurice Lam
108611ff34 Merge "Fix Settings crashes after tapping "Learn more" in fingerprint page" 2017-08-31 02:04:01 +00:00
Colin Cross
1ef4caaf3f Fix errorprone build
Fixes:
packages/apps/Settings/tests/robotests/src/com/android/settings/language/LanguageAndInputSettingsTest.java:95: error: [MockitoCast] A bug in Mockito will cause this test to fail at runtime with a ClassCastException
        when(mContext.getSystemService(AutofillManager.class)).thenReturn(mAutofillManager);
            ^
    (see http://errorprone.info/bugpattern/MockitoCast)
  Did you mean 'when((Object) mContext.getSystemService(AutofillManager.class)).thenReturn(mAutofillManager);'?

packages/apps/Settings/tests/robotests/src/com/android/settings/search/IntentSearchViewHolderTest.java:195: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
    public void testBindViewElements_appSearchResult() {
                ^
    (see http://errorprone.info/bugpattern/JUnit4TestNotRun)
  Did you mean '@Test'?

Bug: 64489631
Test: m -j RUN_ERROR_PRONE=true javac-check
Merged-In: I79477f331ae447d2505a1519da09886bf07ba1a2
Merged-in: I333372699b263d02cc4083289dc746c7aacd414d
Change-Id: I8fd30fc741927de3f6527aca6d98d8851ef23794
2017-08-29 12:57:06 -07:00
liming.wang
0db5a99608 Fix Settings crashes after tapping "Learn more" in fingerprint page
It is possible in certain build configurations to have an invalid
link. Instead of crashing, swallow the error and write to logs.

Fixes: 64322876 
Test: manual - go to Settings > Security & Location > Fingerprint
               and then tap "Learn more"

Change-Id: I70beca880261df0ee3eef94f5469f44130ffd95a
2017-08-23 03:32:40 +00:00
Treehugger Robot
54eeafa052 Merge "Change to not cache user entered apn type as user may change it." 2017-08-22 21:02:03 +00:00
Treehugger Robot
f9390ce1fb Merge changes from topic "Read dun APNs from apn db"
* changes:
  Change empty apn type in user entered APN to non-read-only types.
  Check for null mReadOnlyApnTypes.
  Disallow adding/editing dun APNs unless allowed by carrier.
2017-08-22 19:52:21 +00:00
Amit Mahajan
efe090ec60 Change to not cache user entered apn type as user may change it.
Test: manual
Bug: 64263412
Change-Id: Idc49109926e123eddec7f6553f3c493b1ed22212
2017-08-22 19:36:45 +00:00
TreeHugger Robot
937e2d5a8e Change empty apn type in user entered APN to non-read-only types.
Test: Manually added APN and verified read-only and non-wildcardable
types are not included
Bug: 38186417

Change-Id: I07bcf1c2a950a1257446f0a7beb602fed79423b3
2017-08-22 18:20:32 +00:00
Amit Mahajan
2bfc9906c1 Check for null mReadOnlyApnTypes.
Test: none
Bug: 62247121
Change-Id: I6866bf2df8d4cb46dd75b94ab88c1e62e65ddda7
2017-08-22 11:09:42 -07:00
Amit Mahajan
607e684f64 Disallow adding/editing dun APNs unless allowed by carrier.
Test: WIP
Bug: 38186417
Change-Id: If1cc34ad979659a56a3886da2a02fdbf642739ac
2017-08-22 11:09:42 -07:00
Bill Yi
4ced4787ce Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64086495
Change-Id: I4e5c4860eae1b41fea7a34a88b53630d86745e8e
2017-08-17 16:57:35 -07:00
Nick Desaulniers
f25a418e24 Merge "DeviceInfoSettingsTest: test parsing llvm kernel"
am: 33046b4ec2  -s ours

Change-Id: I1f83d7375246e2b84bb3a0f911dfdc5980da76f9
2017-08-16 18:34:27 +00:00
Treehugger Robot
33046b4ec2 Merge "DeviceInfoSettingsTest: test parsing llvm kernel" 2017-08-16 18:00:44 +00:00
Nick Desaulniers
4021eb5229 DeviceInfoSettingsTest: test parsing llvm kernel
Adds unit test for DeviceInfoUtils.formatKernelVersion to see if it can
parse a /proc/version string from a kernel compiled with Clang/LLVM.

Bug: 32455817
Change-Id: I25123bf44f67e038e01d8c76d6eab18d5616c7c2
2017-08-16 09:51:41 -07:00
mingliang.x.lei
8d3bb3e2ad Merge "Fix memory leak in Bluetooth settings"
am: 5a652c0286

Change-Id: Ica95ac1bed6dbbc305315a32c1c9a92bb83d4574
2017-08-09 18:34:07 +00:00
Treehugger Robot
5a652c0286 Merge "Fix memory leak in Bluetooth settings" 2017-08-09 18:27:43 +00:00
Maurice Lam
dbfde54fb6 Merge "Show help string when onEnrollmentHelp() is called"
am: 5a926705ef

Change-Id: I5af1cac8ee4018e40005484631b6f3f3434e03b9
2017-08-08 22:56:38 +00:00
Maurice Lam
5a926705ef Merge "Show help string when onEnrollmentHelp() is called" 2017-08-08 22:02:20 +00:00
Bill Yi
c89d5b0093 Import translations. DO NOT MERGE
Change-Id: Iba61a113e9577a1afa3e18880e803c65352e1a73
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-06 10:38:44 -07:00
Jian Zhou
3aee5e1ad0 Merge "Settings: Fix SparseArray null pointer issue in monkey issues"
am: 41b4d908bb

Change-Id: If3c634811506bdc9f3de5501e60f6a662ac2873a
2017-07-27 18:22:21 +00:00
Ryusuke Sawa
b0e008841f Merge "Show Error dialog when WPS is interrupted"
am: fd7dec5d4a

Change-Id: I5ff4247745eba606c22481466f2b9a49e1c604d3
2017-07-27 18:21:19 +00:00
Treehugger Robot
41b4d908bb Merge "Settings: Fix SparseArray null pointer issue in monkey issues" 2017-07-27 18:16:08 +00:00
Treehugger Robot
fd7dec5d4a Merge "Show Error dialog when WPS is interrupted" 2017-07-27 18:15:35 +00:00
Ryusuke Sawa
a15be47bd5 Show Error dialog when WPS is interrupted
When WPS searching is interruptd by turning Wi-Fi off,
Error dialog should be displayed.

Bug: 29883134
Test: manual - tap WPS Push Button and turn Airplane mode on

Change-Id: Ie6667c6b7d09540af21b015e0d5b991d818d2c77
2017-07-27 10:53:31 +09:00
Pengfei Zhao
dfe237f2cf Merge "Fix Settings crash when setting only decimal point to data usage warning"
am: 3a2e327741

Change-Id: Ic25c64da40b1accb9dce63a63462acd01664e054
2017-07-18 20:31:57 +00:00
Treehugger Robot
3a2e327741 Merge "Fix Settings crash when setting only decimal point to data usage warning" 2017-07-18 20:24:35 +00:00
Pengfei Zhao
c05a3a0227 Fix Settings crash when setting only decimal point to data usage warning
Settings app crashes when only decimal point (".") is set to
data usage warning because it is not a valid number.
To fix this issue, the decimal point should be converted to 0.

Fixes: 63787824
Test: manual - go to Settings > Data usage > Mobile data usage and then
               set only decimal point to data usage warning.

Change-Id: Iefb6a035ba6f17b8e0c89f79dbd397e2356fb19c
2017-07-18 06:50:18 +00:00
xiaocheng.x.wang
8ef6f6c839 Merge "Black screen appears after tapping the back key"
am: abcd256842

Change-Id: I2deeaed21b9452933e25a324e420c1cacfcfb395
2017-07-17 21:46:47 +00:00
Treehugger Robot
abcd256842 Merge "Black screen appears after tapping the back key" 2017-07-17 21:39:29 +00:00
Nobuyuki Nakamura
2c872109eb Show help string when onEnrollmentHelp() is called
The help string is not shown when onEnrollmentHelp() is called
between onEnrollmentProgressChange() and mTouchAgainRunnable#run().
To fix this issue, showError() should be called.

Bug: 30274453
Test: manual - start enrolling fingerprint and move finger fast on the sensor

Change-Id: Ie604532940e40cca66dc54b56c3cb4b828a07987
2017-07-12 05:42:37 +00:00
mingliang.x.lei
36c25af6a1 Fix memory leak in Bluetooth settings
Bluetooth settings screen has two categories. Each category should call
removeAll() method to unregister a callback from CachedBluetoothDevice.
But the method is not called for mPairedDevicesCategory.

Bug: 30004142
Test: manual - connect to Bluetooth device and then
               open and close Bluetooth settings screen repeatedly

Change-Id: I5a72994473ee2bb5fc3ad00176d9a930b4839099
2017-07-12 05:42:14 +00:00
kun.tang
d34ce65e22 Merge "Fix Phone crash when rorate screen on SimStatus."
am: 3cbae7d6b5

Change-Id: I3c968a9bbd7bb687aae53d5d74a9a2b3e38bcbae
2017-07-10 19:17:03 +00:00
Treehugger Robot
3cbae7d6b5 Merge "Fix Phone crash when rorate screen on SimStatus." 2017-07-10 19:08:11 +00:00
kun.tang
0c06bab9cc Fix Phone crash when rorate screen on SimStatus.
When rorate screen on SimStatus, Fragment not attached to Activity, phone crash.
Solution: use mRes to getString
Test: build

07-07 13:20:27.237   696   696 E AndroidRuntime: Process: com.android.phone, PID: 696
07-07 13:20:27.237   696   696 E AndroidRuntime: java.lang.IllegalStateException: Fragment SimStatus{d1e4bb3} not attached to Activity
07-07 13:20:27.237   696   696 E AndroidRuntime:        at android.app.Fragment.getResources(Fragment.java:861)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at com.android.settings.deviceinfo.SimStatus.updateSignalStrength(SimStatus.java:359)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at com.android.settings.deviceinfo.SimStatus$4.onSignalStrengthsChanged(SimStatus.java:444)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at android.telephony.PhoneStateListener$1.handleMessage(PhoneStateListener.java:334)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:105)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:164)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6558)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
07-07 13:20:27.237   696   696 E AndroidRuntime:        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygot

Change-Id: Ife8f2e3ed8c4fe6db0fe784a43910768ff3ff4d1
2017-07-08 11:09:02 +08:00
daqi
34fe9136c6 Merge "Fix PremiumSmsAccess memory leak"
am: 31a2f413f8  -s ours

Change-Id: Ibaba7d54ce393f2212df3f05b8929b445ccba912
2017-06-26 22:05:13 +00:00
Treehugger Robot
31a2f413f8 Merge "Fix PremiumSmsAccess memory leak" 2017-06-26 21:13:49 +00:00
Bill Yi
5386943cf2 Merge "Import translations. DO NOT MERGE" into oc-dev
am: 6b1ff7073a  -s ours

Change-Id: Ic3856a964218fae0861218de0ca46f3d50820e5f
2017-06-23 12:29:05 +00:00
TreeHugger Robot
6b1ff7073a Merge "Import translations. DO NOT MERGE" into oc-dev 2017-06-23 12:23:16 +00:00
Bill Yi
8ec66e1f56 Import translations. DO NOT MERGE
Change-Id: I86e7dbea32adfb191ec6bb40cb2a4714bd583c24
Auto-generated-cl: translation import
2017-06-23 01:39:20 -07:00
daqi
b279330c0a Fix PremiumSmsAccess memory leak
[Cause of Defect]
PremiumSmsAccess forget to invoke Session and AppStateSmsPremBridge
release method in the onDestroy callback.
And that would lead to the leak of activity context.

Test: 1. Settings - Apps - Advanced - Special access - Premium SMS access
      2. adb shell dumpsys meminfo com.android.settings
      3. observe activity object number
      4. back to the last page
      5. use AS trigger Settings gc several times
      6. adb shell dumpsys meminfo com.android.settings
      7. observe activity object number to check if the activity number decrease

Change-Id: I359900c16fa866fba94d187a61cf6bebbdd1ed0b
Signed-off-by: daqi <daqi@xiaomi.com>
2017-06-23 14:17:49 +08:00
Daniel Nishi
b57a71fe08 Count cache in storage categories.
am: b22b85b593

Change-Id: Idf44c0cd337cbd9aefc12dce8adecf97b4dc2d99
2017-06-23 04:19:16 +00:00
Daniel Nishi
b22b85b593 Count cache in storage categories.
This makes the System size more consistent because cache is not
attributed to the system (when the cache is under quota).

Change-Id: I680e70daf5e98b9a205023a218dfd1dcc8ee8334
Fixes: 62623731
Test: Settings Unit Test
2017-06-22 19:08:48 -07:00
Marie Janssen
0efa2b3427 Bluetooth: Make notifications local-only
am: 1138397336

Change-Id: Id287a1ba31898da57385a8e72cacbe03d7b78946
2017-06-23 00:22:23 +00:00
Marie Janssen
1138397336 Bluetooth: Make notifications local-only
This will prevent them from showing up on external devices where they
would be less than useful.

Test: connect to watch and pair a device
Bug: 34612389
Change-Id: I8b02c20200ce78a73967b8121cf7d5653b68f356
(cherry picked from commit 426903d155)
2017-06-22 16:18:59 +00:00
Marie Janssen
3cc4522cbc Merge "Bluetooth: Make notifications local-only" am: 348a7085fa
am: 620fe71520

Change-Id: I3df0a009c7fc6184ea1176f6953748c5031d76cd
2017-06-22 15:41:55 +00:00
Marie Janssen
620fe71520 Merge "Bluetooth: Make notifications local-only"
am: 348a7085fa

Change-Id: I7de9c9c01f1f704399c1b594beafca5bc14ef8df
2017-06-22 15:37:28 +00:00
Treehugger Robot
348a7085fa Merge "Bluetooth: Make notifications local-only" 2017-06-22 15:31:39 +00:00
Bill Yi
a3821d019a Import translations. DO NOT MERGE
am: ae5a31e55c  -s ours

Change-Id: Ic37588db9f8b69ef7fa7d69c27e717ac4f241383
2017-06-21 20:21:34 +00:00
Bill Yi
ae5a31e55c Import translations. DO NOT MERGE
Change-Id: Idfada62fcc0224d6bffd354ab140fd5300a5a8a3
Auto-generated-cl: translation import
2017-06-20 21:36:56 -07:00