Skip to content

Commit 925a659

Browse files
Robert GreenwaltAndroid (Google) Code Review
authored andcommitted
Merge "Use updatable file for premium-sms filter" into jb-mr1-dev
2 parents c552081 + c6fa237 commit 925a659

File tree

6 files changed

+33
-200
lines changed

6 files changed

+33
-200
lines changed

core/java/android/provider/Settings.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4624,13 +4624,6 @@ public static final class Global extends NameValueTable {
46244624
*/
46254625
public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule";
46264626

4627-
/**
4628-
* Prefix for SMS short code regex patterns (country code is appended).
4629-
* @see com.android.internal.telephony.SmsUsageMonitor
4630-
* @hide
4631-
*/
4632-
public static final String SMS_SHORT_CODES_PREFIX = "sms_short_codes_";
4633-
46344627
/**
46354628
* Used to disable Tethering on a device - defaults to true
46364629
* @hide

core/res/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,12 @@
21522152
</intent-filter>
21532153
</receiver>
21542154

2155+
<receiver android:name="com.android.server.updates.SmsShortCodesInstallReceiver" >
2156+
<intent-filter>
2157+
<action android:name="android.intent.action.UPDATE_SMS_SHORT_CODES" />
2158+
</intent-filter>
2159+
</receiver>
2160+
21552161
<receiver android:name="com.android.server.MasterClearReceiver"
21562162
android:permission="android.permission.MASTER_CLEAR"
21572163
android:priority="100" >

core/res/res/values/symbols.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,6 @@
10921092
<java-symbol type="xml" name="kg_password_kbd_numeric" />
10931093
<java-symbol type="xml" name="power_profile" />
10941094
<java-symbol type="xml" name="time_zones_by_country" />
1095-
<java-symbol type="xml" name="sms_short_codes" />
10961095

10971096
<java-symbol type="raw" name="accessibility_gestures" />
10981097
<java-symbol type="raw" name="incognito_mode_start_page" />

core/res/res/xml/sms_short_codes.xml

Lines changed: 0 additions & 189 deletions
This file was deleted.

services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private X509Certificate getCert(ContentResolver cr) {
126126
CertificateFactory cf = CertificateFactory.getInstance("X.509");
127127
return (X509Certificate) cf.generateCertificate(istream);
128128
} catch (CertificateException e) {
129-
throw new IllegalStateException("Got malformed certificate from settings, ignoring", e);
129+
throw new IllegalStateException("Got malformed certificate from settings, ignoring");
130130
}
131131
}
132132

@@ -167,7 +167,7 @@ private int getCurrentVersion() throws NumberFormatException {
167167
String strVersion = IoUtils.readFileAsString(updateVersion.getCanonicalPath()).trim();
168168
return Integer.parseInt(strVersion);
169169
} catch (IOException e) {
170-
Slog.i(TAG, "Couldn't find current metadata, assuming first update", e);
170+
Slog.i(TAG, "Couldn't find current metadata, assuming first update");
171171
return 0;
172172
}
173173
}
@@ -181,7 +181,7 @@ private String getCurrentContent() {
181181
try {
182182
return IoUtils.readFileAsString(updateContent.getCanonicalPath()).trim();
183183
} catch (IOException e) {
184-
Slog.i(TAG, "Failed to read current content, assuming first update!", e);
184+
Slog.i(TAG, "Failed to read current content, assuming first update!");
185185
return null;
186186
}
187187
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (C) 2012 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.server.updates;
18+
19+
public class SmsShortCodesInstallReceiver extends ConfigUpdateInstallReceiver {
20+
21+
public SmsShortCodesInstallReceiver() {
22+
super("/data/misc/sms/", "codes", "metadata/", "version");
23+
}
24+
}

0 commit comments

Comments
 (0)