Skip to content

Commit 683e34f

Browse files
committed
関数の修正
1 parent ac91e06 commit 683e34f

File tree

7 files changed

+110
-5
lines changed

7 files changed

+110
-5
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
defaultConfig {
1010
minSdk = 22
1111
targetSdk = 35
12-
versionCode = 14
13-
versionName = "1.5.1"
12+
versionCode = 15
13+
versionName = "1.5.2"
1414
proguardFiles += 'proguard-rules.pro'
1515
multiDexEnabled = false
1616
}

app/libs/DchaService.jar

-1.68 KB
Binary file not shown.

app/libs/DchaUtilService.jar

-1.59 KB
Binary file not shown.

app/src/main/java/me/s1204/benesse/dcha/test/Tester.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,25 @@ public void onServiceDisconnected(ComponentName componentName) {
181181
}
182182
});
183183

184+
// getCanonicalExternalPath
185+
findViewById(R.id.btn_getCanonicalExternalPath).setOnClickListener(view -> {
186+
setContentView(R.layout.layout_getcanonicalexternalpath);
187+
188+
// getCanonicalExternalPath(linkPath)
189+
findViewById(R.id.exec).setOnClickListener(view111 -> {
190+
EditText linkPathBox = findViewById(R.id.getCanonicalExternalPath_linkPath);
191+
String linkPath = linkPathBox.getText().toString();
192+
try {
193+
String result = String.valueOf(mDchaService.getCanonicalExternalPath(linkPath));
194+
Toast.makeText(getApplicationContext(), "実行結果:" + result, Toast.LENGTH_LONG).show();
195+
} catch (RemoteException ignored) {
196+
}
197+
});
198+
199+
// メニューに戻る
200+
findViewById(R.id.backHome).setOnClickListener(view112 -> backHome());
201+
});
202+
184203
// getForegroundPackageName
185204
findViewById(R.id.btn_getForegroundPackageName).setOnClickListener(view -> {
186205
try {

app/src/main/res/layout/about_dcha.xml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,41 @@
253253
android:textSize="16sp" />
254254
</LinearLayout>
255255

256+
<View
257+
android:layout_width="match_parent"
258+
android:layout_height="4dp"
259+
android:background="@android:color/darker_gray" />
260+
261+
<!-- getCanonicalExternalPath -->
262+
<TextView
263+
android:id="@+id/about_getCanonicalExternalPath"
264+
android:layout_width="wrap_content"
265+
android:layout_height="wrap_content"
266+
android:layout_marginStart="20dp"
267+
android:layout_marginTop="12dp"
268+
android:layout_marginBottom="4dp"
269+
android:text="String getCanonicalExternalPath(String linkPath)"
270+
android:textColor="@android:color/black"
271+
android:textSize="24sp" />
272+
273+
<LinearLayout
274+
android:layout_width="wrap_content"
275+
android:layout_height="wrap_content"
276+
android:layout_marginStart="40dp"
277+
android:layout_marginEnd="40dp"
278+
android:orientation="vertical">
279+
280+
<TextView
281+
android:id="@+id/about_getCanonicalExternalPath_detail"
282+
android:layout_width="wrap_content"
283+
android:layout_height="wrap_content"
284+
android:layout_marginTop="8dp"
285+
android:layout_marginBottom="8dp"
286+
android:text="指定されたパスの絶対パスを取得します。\nこれは内部ストレージも使用可能です。"
287+
android:textColor="#000000"
288+
android:textSize="16sp" />
289+
</LinearLayout>
290+
256291
<View
257292
android:layout_width="match_parent"
258293
android:layout_height="4dp"
@@ -608,15 +643,15 @@
608643
android:layout_height="4dp"
609644
android:background="@android:color/darker_gray" />
610645

611-
<!-- setDefaultPreferredApp -->
646+
<!-- setDefaultPreferredHomeApp -->
612647
<TextView
613648
android:id="@+id/about_setDefaultPreferredApp"
614649
android:layout_width="wrap_content"
615650
android:layout_height="wrap_content"
616651
android:layout_marginStart="20dp"
617652
android:layout_marginTop="12dp"
618653
android:layout_marginBottom="4dp"
619-
android:text="void setDefaultPreferredApp(String packageName)"
654+
android:text="void setDefaultPreferredHomeApp(String packageName)"
620655
android:textColor="@android:color/black"
621656
android:textSize="24sp" />
622657

app/src/main/res/layout/about_util.xml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
android:layout_height="wrap_content"
214214
android:layout_marginTop="8dp"
215215
android:layout_marginBottom="8dp"
216-
android:text="指定されたパスの絶対パスを取得します。\nこれは内部ストレージも使用可能です。\n本来は DchaService にも搭載されているはずなのですが、使用できませんでした。"
216+
android:text="指定されたパスの絶対パスを取得します。\nこれは内部ストレージも使用可能です。"
217217
android:textColor="#000000"
218218
android:textSize="16sp" />
219219
</LinearLayout>
@@ -463,6 +463,41 @@
463463
android:textSize="16sp" />
464464
</LinearLayout>
465465

466+
<View
467+
android:layout_width="match_parent"
468+
android:layout_height="4dp"
469+
android:background="@android:color/darker_gray" />
470+
471+
<!-- setDefaultPreferredHomeApp -->
472+
<TextView
473+
android:id="@+id/about_setDefaultPreferredApp"
474+
android:layout_width="wrap_content"
475+
android:layout_height="wrap_content"
476+
android:layout_marginStart="20dp"
477+
android:layout_marginTop="12dp"
478+
android:layout_marginBottom="4dp"
479+
android:text="void setDefaultPreferredHomeApp(String packageName)"
480+
android:textColor="@android:color/black"
481+
android:textSize="24sp" />
482+
483+
<LinearLayout
484+
android:layout_width="wrap_content"
485+
android:layout_height="wrap_content"
486+
android:layout_marginStart="40dp"
487+
android:layout_marginEnd="40dp"
488+
android:orientation="vertical">
489+
490+
<TextView
491+
android:id="@+id/about_setDefaultPreferredApp_detail"
492+
android:layout_width="wrap_content"
493+
android:layout_height="wrap_content"
494+
android:layout_marginTop="8dp"
495+
android:layout_marginBottom="8dp"
496+
android:text="指定されたパッケージを既定のランチャーとして設定します。\nIntent の Action に MAIN、Category に DEFAULT, HOME が必要です。"
497+
android:textColor="#000000"
498+
android:textSize="16sp" />
499+
</LinearLayout>
500+
466501
<View
467502
android:layout_width="match_parent"
468503
android:layout_height="4dp"

app/src/main/res/layout/layout.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,22 @@
122122
android:textSize="14sp" />
123123
</LinearLayout>
124124

125+
<LinearLayout
126+
android:layout_width="match_parent"
127+
android:layout_height="wrap_content"
128+
android:padding="1dp">
129+
130+
<Button
131+
android:id="@+id/btn_getCanonicalExternalPath"
132+
android:layout_width="0dp"
133+
android:layout_height="wrap_content"
134+
android:layout_gravity="center"
135+
android:layout_weight="1"
136+
android:text="getCanonicalExternalPath"
137+
android:textAllCaps="false"
138+
android:textSize="14sp" />
139+
</LinearLayout>
140+
125141
<LinearLayout
126142
android:layout_width="match_parent"
127143
android:layout_height="wrap_content"

0 commit comments

Comments
 (0)